ImportError: No module named pyplot

Hi,

I am using Ubuntu Gutsy 7.10 and want to use matplotlib.pyplot but when I
execute:

import matplotlib.pyplot as plt

I get:

import matplotlib.plot as plt

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

I installed matplotlib using synaptic.

I found another reference to this problem on Google but no solution.

I cannot find pyplot.py anywhere on my disk. I can import matplotlib by
itself.

Is there another Ubuntu package I should install? Is anyone working on a
fix to the matplotlib ubuntu packages? If so, then does anyone know when
this may be resolved?

Any advice would be appreciated.

Thank you,
Marc

···

--
View this message in context: http://www.nabble.com/ImportError%3A-No-module-named-pyplot-tp21576482p21576482.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

mzs wrote:

Hi,

I am using Ubuntu Gutsy 7.10 and want to use matplotlib.pyplot but when I
execute:

import matplotlib.pyplot as plt

I get:

import matplotlib.plot as plt

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

I installed matplotlib using synaptic.

I found another reference to this problem on Google but no solution.

I cannot find pyplot.py anywhere on my disk. I can import matplotlib by
itself.

Is there another Ubuntu package I should install? Is anyone working on a
fix to the matplotlib ubuntu packages? If so, then does anyone know when
this may be resolved?

Any advice would be appreciated.

What version of matplotlib do you have?

  import matplotlib
  print matplotlib.__version__

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

here you wrote "plot" not "pyplot": might this be the problem?

Regards,

···

On Wed, Jan 21, 2009 at 04:23, mzs <ms@...2464...> wrote:

Hi,

I am using Ubuntu Gutsy 7.10 and want to use matplotlib.pyplot but when I
execute:

import matplotlib.pyplot as plt

I get:

import matplotlib.plot as plt

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

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

Yes, I did have an typo in when reporting the problem, it should be pyplot
not plot. However, the problem is with pyplot anyway. The version of
matplotlib is 0.90.1 as shown here:

  >>> import matplotlib.pyplot as plt
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  ImportError: No module named pyplot
  >>> import matplotlib
  >>> print matplotlib.__version__
  0.90.1
  >>>

If this version is to young then how can I get Ubuntu to load a later
version?

Thank you for your response. Again, I appreciate any help anyone could
provide.

Ryan May-3 wrote:

···

mzs wrote:

Hi,

I am using Ubuntu Gutsy 7.10 and want to use matplotlib.pyplot but when I
execute:

import matplotlib.pyplot as plt

I get:

import matplotlib.plot as plt

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

I installed matplotlib using synaptic.

I found another reference to this problem on Google but no solution.

I cannot find pyplot.py anywhere on my disk. I can import matplotlib by
itself.

Is there another Ubuntu package I should install? Is anyone working on a
fix to the matplotlib ubuntu packages? If so, then does anyone know when
this may be resolved?

Any advice would be appreciated.

What version of matplotlib do you have?

  import matplotlib
  print matplotlib.__version__

Ryan

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
View this message in context: http://www.nabble.com/ImportError%3A-No-module-named-pyplot-tp21576482p21582333.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Yes, I did have an typo in when reporting the problem, it should be pyplot
not plot. However, the problem is with pyplot anyway. The version of
matplotlib is 0.90.1 as shown here:

>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named pyplot
>>> import matplotlib
>>> print matplotlib.__version__
0.90.1
>>>

In the early releases of matplotlib, the procedural plotting interface
of matplotlib resided in "pylab", which also mixed in a lot of
numerical routines from numpy and other places. *After* the release
of 0.90.1, Eric Firing reorganized the plotting functions into a
separate module "matplotlib.pyplot" so people could access them w/o
having to get all of the numpy functions in the same namespace. See

  http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related

The version you are using is 2 years old, so you may want to consider
upgrading. But you can get the same functionality with 0.90.1 by
simply

   >>> import pylab as plt

instead of

   >>> import matplotlib.pyplot as plt

JDH

···

On Wed, Jan 21, 2009 at 6:38 AM, mzs <ms@...2464...> wrote:

Thank you for the information. I figured out that using pylab works. I
would rather use a current version. I tried to find the version you
mentioned in a deb package for Ubuntu but it doesn't seem to exist. Do you
know why or where can I get it?

Thank you again.
Marc

John Hunter-4 wrote:

···

On Wed, Jan 21, 2009 at 6:38 AM, mzs <ms@...2464...> wrote:

Yes, I did have an typo in when reporting the problem, it should be
pyplot
not plot. However, the problem is with pyplot anyway. The version of
matplotlib is 0.90.1 as shown here:

>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named pyplot
>>> import matplotlib
>>> print matplotlib.__version__
0.90.1
>>>

In the early releases of matplotlib, the procedural plotting interface
of matplotlib resided in "pylab", which also mixed in a lot of
numerical routines from numpy and other places. *After* the release
of 0.90.1, Eric Firing reorganized the plotting functions into a
separate module "matplotlib.pyplot" so people could access them w/o
having to get all of the numpy functions in the same namespace. See

http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related

The version you are using is 2 years old, so you may want to consider
upgrading. But you can get the same functionality with 0.90.1 by
simply

   >>> import pylab as plt

instead of

   >>> import matplotlib.pyplot as plt

JDH

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
View this message in context: http://www.nabble.com/ImportError%3A-No-module-named-pyplot-tp21576482p21583697.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Probably there are none for the version of Ubuntu you're using but
there are newer packages in Ubuntu[1].

I'm not a Ubuntu guru, but you seem to be rather old in version, I
suggest, given the short release period, to keep your system
up-to-date to the current version (not 8.10 I think) and there there
are newer binary packages too[2].

[1] https://launchpad.net/ubuntu/+source/matplotlib
[2] http://packages.ubuntu.com/search?keywords=python-matplotlib

Regards,

···

On Wed, Jan 21, 2009 at 15:01, mzs <ms@...2464...> wrote:

Thank you for the information. I figured out that using pylab works. I
would rather use a current version. I tried to find the version you
mentioned in a deb package for Ubuntu but it doesn't seem to exist. Do you
know why or where can I get it?

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

Thank you. I finally upgraded my Ubuntu system, pretty easy, and now pylab
is available. Thank you to everyone on this thread for your input.

BTW, matplotlib is very nicely done, useful, and appreciated.

Marc

Sandro Tosi-4 wrote:

···

On Wed, Jan 21, 2009 at 15:01, mzs <ms@...2464...> wrote:

Thank you for the information. I figured out that using pylab works. I
would rather use a current version. I tried to find the version you
mentioned in a deb package for Ubuntu but it doesn't seem to exist. Do
you
know why or where can I get it?

Probably there are none for the version of Ubuntu you're using but
there are newer packages in Ubuntu[1].

I'm not a Ubuntu guru, but you seem to be rather old in version, I
suggest, given the short release period, to keep your system
up-to-date to the current version (not 8.10 I think) and there there
are newer binary packages too[2].

[1] https://launchpad.net/ubuntu/+source/matplotlib
[2] http://packages.ubuntu.com/search?keywords=python-matplotlib

Regards,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
View this message in context: http://www.nabble.com/ImportError%3A-No-module-named-pyplot-tp21576482p21630876.html
Sent from the matplotlib - users mailing list archive at Nabble.com.