Using Matplotlib when DISPLAY is undefined

import matplotlib

Force matplotlib to not use any Xwindows backend.

matplotlib.use(‘Agg’)

or

This is a configuration issue with matplotlib, the library that QIIME uses for generating plots. You might want to work with your system administrator on this, as I’m not sure if there is a specific reason for this configuration. Your current matplotlib backend is set to qt4agg, which requires there to be an active display, but you don’t have an active display (as indicated by there being no result when you called echo $DISPLAY).

To get around this, you should first check if you have a matplotlibrc file. You can do this by running:

python -c “import matplotlib; print(matplotlib.matplotlib_fname())”

If that returns a filepath, you’ll want to look for a line in that file that contains this:

backend : qt4agg

I would created a backup of that file, and then (in the original copy) replace that line with:

backend : agg

If you don’t already have a matplotlibrc file, you can create one at $HOME/.matplotlib/matplotlibrc. That file should contain only the line:

backend : agg

As I mentioned, you might want to talk with your system administrator about this before making any changes.

Sorry for the trouble - I realize this is a bit of a complicated fix, but it does seem to be a server/matplotlib configuration issue, not an issue that is specific to QIIME.

If you could get back to me to let me know if that works, that would be very useful in case other users run into this in the future.


文章作者: 物探网
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 物探网 !
 上一篇
利用scp传输文件 利用scp传输文件
1、从服务器下载文件 scp username@servername:/path/filename /tmp/local_destination 例如scp codinglog@192.168.0.101:/home/kimi/test
2016-09-12 物探网
下一篇 
ssh自动登录的4种实现方法 ssh自动登录的4种实现方法
自动ssh/scp方法A为本地主机(即用于控制其他主机的机器) ;B为远程主机(即被控制的机器Server), 假如ip为192.168.60.110;A和B的系统都是Linux在A上运行命令:ssh-keygen -t rsa (连续三
2016-09-12 物探网
  目录