Python终端中的Gnuplot导入错误

问题描述:

我有Gnuplot 4.2 patchlevel 6安装在我的Centos 6系统上。然而,每当我尝试在Python终端进口gnuplot的,我得到它说,没有命名的Gnuplot模块的错误消息:Python终端中的Gnuplot导入错误

'>>> import Gnuplot 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: No module named Gnuplot` 

请帮助。谢谢。

+0

Python版本是2.6.6 – aman 2015-04-03 09:52:53

+0

你是什么检查的路径得到什么? http://*.com/a/9462280/2375207 – nicolallias 2015-04-03 09:58:13

+0

['','/usr/lib/python26.zip','/usr/lib/python2.6','/usr/lib/python2.6/ plat-linux2','/usr/lib/python2.6/lib-tk','/usr/lib/python2.6/lib-old','/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages','/usr/lib/python2.6/site-packages/gst-0.10','/usr/lib/python2.6/site-packages/gtk- 2.0','/usr/lib/python2.6/site-packages/webkit-1.0'] – aman 2015-04-03 10:02:45

尝试:

pip install gnuplot-py 

如果它不能正常工作,请尝试从http://gnuplot-py.sourceforge.net/下载包并安装它。

+0

我试过yum install gnuplot-py。有效!谢谢! – aman 2015-04-03 10:47:00

pip install gnuplot-py 

因此未为我工作

Collecting gnuplot-py 
Could not find a version that satisfies the requirement gnuplot-py (from versions:) 
    Some externally hosted files were ignored as access to them may be unreliable (use --allow-external gnuplot-py to allow). 
No matching distribution found for gnuplot-py 

但下面做了工作:

wget http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.tar.gz 
tar xzf gnuplot-py-1.8.tar.gz 
cd gnuplot-py-1.8/ 
python setup.py install