qiime1 matplotlab绘图报错解决:_tkinter.TclError: no display name and no $DISPLAY environment variable

qiime1 matplotlab绘图报错解决:_tkinter.TclError: no display name and no $DISPLAY environment variable
Command run was:
 plot_taxa_summary.py -i /share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/otu_table_no_singletons_rare_sorted_L2.txt,/share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/otu_table_no_singletons_rare_sorted_L3.txt,/share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/otu_table_no_singletons_rare_sorted_L4.txt,/share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/otu_table_no_singletons_rare_sorted_L5.txt,/share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/otu_table_no_singletons_rare_sorted_L6.txt,/share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/otu_table_no_singletons_rare_sorted_L7.txt -o /share/nas1/huangls/test/ampliseq-q1/16s2/4.Qiime_analysis/taxa_summary_plot/taxa_summary_plots/ --x_width 8 --chart_type bar --bar_width 0.5
Command returned exit status: 1
Stdout:
Stderr
Traceback (most recent call last):
  File "/share/work/biosoft/python/Python-v2.7.11/bin/plot_taxa_summary.py", line 278, in <module>
    main()
  File "/share/work/biosoft/python/Python-v2.7.11/bin/plot_taxa_summary.py", line 274, in main
    resize_nth_label, label_type, include_html_legend)
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 1142, in make_all_charts
    resize_nth_label, label_type, include_html_legend))
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 1077, in get_counts
    label_type, include_html_legend))
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 865, in make_HTML_table
    props={'title': title})
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 470, in make_area_bar_chart
    fig = figure(figsize=(plot_width, plot_height))
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/matplotlib/pyplot.py", line 535, in figure
    **kwargs)
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager
    return new_figure_manager_given_figure(num, figure)
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure
    window = Tk.Tk()
  File "/share/work/biosoft/python/Python-v2.7.11/lib/python2.7/lib-tk/Tkinter.py", line 1814, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable


以上为报错信息,解决办法为设置matplotlib默认绘图输出:
运行以下命令:

mkdir -p ~/.config/matplotlib && echo "backend : Agg" > ~/.config/matplotlib/matplotlibrc

  • 发表于 2020-10-19 14:55
  • 阅读 ( 3023 )
  • 分类:宏基因组

0 条评论

请先 登录 后评论
omicsgene
omicsgene

生物信息

702 篇文章

作家榜 »

  1. omicsgene 702 文章
  2. 安生水 351 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. xun 82 文章
  6. rzx 78 文章
  7. 红橙子 78 文章
  8. CORNERSTONE 72 文章