2015-04-03 83 views
1

我有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://stackoverflow.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

回答

2

嘗試:

pip install gnuplot-py 

如果它不能正常工作,請嘗試從http://gnuplot-py.sourceforge.net/下載包並安裝它。

+0

我試過yum install gnuplot-py。有效!謝謝! – aman 2015-04-03 10:47:00

1
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