5

I have Gnuplot 4.2 patchlevel 6 installed on my Centos 6 system. However, whenever I try importing Gnuplot in the python terminal, I get an error message which says that there is no module named Gnuplot:

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

Please help. Thanks.

8
  • Python version is 2.6.6 Commented Apr 3, 2015 at 9:52
  • what do you get by checking the paths? stackoverflow.com/a/9462280/2375207 Commented Apr 3, 2015 at 9:58
  • ['', '/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'] Commented Apr 3, 2015 at 10:02
  • 2
    how did you install it? Commented Apr 3, 2015 at 10:03
  • 1
    Try installing this python-gnuplot Commented Apr 3, 2015 at 10:05

3 Answers 3

4
pip install gnuplot-py

didnot worked for me

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

but following did the job:

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
Sign up to request clarification or add additional context in comments.

Comments

3

try:

pip install gnuplot-py

If it does not work, try downloading the package from http://gnuplot-py.sourceforge.net/ and install it.

Comments

0

The easiest solution would be to

  1. Clone:

    git clone https://github.com/jrk/gnuplot-py into the site-packages

  2. Go to the installed directory use:

    python setup.py install

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.