我在我的Centos 6系统上安装了Gnuplot 4.2 patchlevel 6,然而,每当我尝试在Python终端中导入Gnuplot时,都会出现一个错误消息,说找不到名为Gnuplot的模块:
'>>> import Gnuplot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Gnuplot`
请帮忙。谢谢。
我在我的Centos 6系统上安装了Gnuplot 4.2 patchlevel 6,然而,每当我尝试在Python终端中导入Gnuplot时,都会出现一个错误消息,说找不到名为Gnuplot的模块:
'>>> import Gnuplot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Gnuplot`
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
最简单的解决方案是:
克隆:
git clone https://github.com/jrk/gnuplot-py 到 site-packages 中
进入已安装的目录并使用:
python setup.py install