ImportError: No module named ma

Hi all,

I am on Mac OS 10.5 and numpy 1.3.0 and matplotlib 0.91.1.

When I run a qtdemo script, it fails with
File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/numerix/ma/__init__.py",
line 16, in <module>
    from numpy.core.ma import *
ImportError: No module named ma

Any ideas? I have a mixed up system where I have installed my own
version of Python 2.6 and Apple's version at 2.5. Presently I am using
Apple's version of Python.

Kind regards,
Chaitanya

Diagnostics follow!!

ckande@...2821...:~/Downloads/pyqt_dataplot_demo> python-osx qt_mpl_dataplot.pyw
Traceback (most recent call last):
  File "qt_mpl_dataplot.pyw", line 18, in <module>
    from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
as FigureCanvas
  File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_qt4agg.py",
line 9, in <module>
    from matplotlib.figure import Figure
  File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/figure.py",
line 10, in <module>
    from axes import Axes, Subplot, PolarSubplot, PolarAxes
  File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/axes.py",
line 6, in <module>
    import matplotlib.numerix.npyma as ma
  File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/numerix/__init__.py",
line 166, in <module>
    __import__('ma', g, l)
  File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/numerix/ma/__init__.py",
line 16, in <module>
    from numpy.core.ma import *
ImportError: No module named ma

ckande@...2821...:~> python-osx
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import numpy
print numpy

<module 'numpy' from
'/Library/Python/2.5/site-packages/numpy-1.3.0-py2.5-macosx-10.5-i386.egg/numpy/__init__.pyc'>

import numpy.core
print numpy.core

<module 'numpy.core' from
'/Library/Python/2.5/site-packages/numpy-1.3.0-py2.5-macosx-10.5-i386.egg/numpy/core/__init__.pyc'>

import numpy.core.ma

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

import matplotlib
print matplotlib

<module 'matplotlib' from
'/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/__init__.pyc'>

Hi all,

I am on Mac OS 10.5 and numpy 1.3.0 and matplotlib 0.91.1.

When I run a qtdemo script, it fails with
File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/numerix/ma/__init__.py",
line 16, in<module>
     from numpy.core.ma import *
ImportError: No module named ma

Any ideas? I have a mixed up system where I have installed my own
version of Python 2.6 and Apple's version at 2.5. Presently I am using
Apple's version of Python.

Apple's version of Python comes with numpy 1.0.1, before numpy.core.ma was introduced. It seems like your installation of numpy 1.3.0 did not override Apple's version.

To double-check:

···

On 2009-10-12 11:58 AM, Chaitanya Krishna wrote:

>>> import numpy
>>> print numpy.__file__

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

Hi all,

numpy.__file__ gives 1.3.0

import numpy
print numpy.__file__

/Library/Python/2.5/site-packages/numpy-1.3.0-py2.5-macosx-10.5-i386.egg/numpy/__init__.pyc

Chaitanya

···

On Mon, Oct 12, 2009 at 7:11 PM, Robert Kern <robert.kern@...287...> wrote:

On 2009-10-12 11:58 AM, Chaitanya Krishna wrote:

Hi all,

I am on Mac OS 10.5 and numpy 1.3.0 and matplotlib 0.91.1.

When I run a qtdemo script, it fails with
File "/Library/Python/2.5/site-packages/matplotlib-0.91.1-py2.5-macosx-10.5-i386.egg/matplotlib/numerix/ma/__init__.py",
line 16, in<module>
from numpy.core.ma import *
ImportError: No module named ma

Any ideas? I have a mixed up system where I have installed my own
version of Python 2.6 and Apple's version at 2.5. Presently I am using
Apple's version of Python.

Apple's version of Python comes with numpy 1.0.1, before numpy.core.ma was
introduced. It seems like your installation of numpy 1.3.0 did not override
Apple's version.

To double-check:

>>> import numpy
>>> print numpy.__file__

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Ah, right. I'm sorry. numpy.core.ma is not the location of that subpackage anymore. It is now numpy.ma. Upgrade to a more recent matplotlib.

···

On 2009-10-12 12:19 PM, Chaitanya Krishna wrote:

Hi all,

numpy.__file__ gives 1.3.0

import numpy
print numpy.__file__

/Library/Python/2.5/site-packages/numpy-1.3.0-py2.5-macosx-10.5-i386.egg/numpy/__init__.pyc

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

Hi,

I solved it by installing matplotlib 0.99. But, on Mac 10.5 when I
used easy_install matplotlib, it was still saying that 0.91 was the
latest and I couldn't install it. Finally I had to download the egg
and manually install it (easy_install --install-dir)

Cheers,
Chaitanya

···

On Mon, Oct 12, 2009 at 8:23 PM, Robert Kern <robert.kern@...287...> wrote:

On 2009-10-12 12:19 PM, Chaitanya Krishna wrote:

Hi all,

numpy.__file__ gives 1.3.0

import numpy
print numpy.__file__

/Library/Python/2.5/site-packages/numpy-1.3.0-py2.5-macosx-10.5-i386.egg/numpy/__init__.pyc

Ah, right. I'm sorry. numpy.core.ma is not the location of that subpackage
anymore. It is now numpy.ma. Upgrade to a more recent matplotlib.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I suspect that that version of easy_install has not been fixed to parse Sourceforge's new download pages.

···

On 2009-10-12 15:16 PM, Chaitanya Krishna wrote:

Hi,

I solved it by installing matplotlib 0.99. But, on Mac 10.5 when I
used easy_install matplotlib, it was still saying that 0.91 was the
latest and I couldn't install it. Finally I had to download the egg
and manually install it (easy_install --install-dir)

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

Shouldn't easy_install be reading the pypi data, which points to the
proper sf page?

http://pypi.python.org/pypi/matplotlib

JDH

···

On Mon, Oct 12, 2009 at 3:21 PM, Robert Kern <robert.kern@...287...> wrote:

On 2009-10-12 15:16 PM, Chaitanya Krishna wrote:

Hi,

I solved it by installing matplotlib 0.99. But, on Mac 10.5 when I
used easy_install matplotlib, it was still saying that 0.91 was the
latest and I couldn't install it. Finally I had to download the egg
and manually install it (easy_install --install-dir)

I suspect that that version of easy_install has not been fixed to parse
Sourceforge's new download pages.

BTW, please do not Cc: me. I am subscribed to the list and read through GMane. It's annoying to get list replies to my email where I don't want them.

···

On 2009-10-12 15:38 PM, John Hunter wrote:

On Mon, Oct 12, 2009 at 3:21 PM, Robert Kern<robert.kern@...287...> wrote:

On 2009-10-12 15:16 PM, Chaitanya Krishna wrote:

Hi,

I solved it by installing matplotlib 0.99. But, on Mac 10.5 when I
used easy_install matplotlib, it was still saying that 0.91 was the
latest and I couldn't install it. Finally I had to download the egg
and manually install it (easy_install --install-dir)

I suspect that that version of easy_install has not been fixed to parse
Sourceforge's new download pages.

Shouldn't easy_install be reading the pypi data, which points to the
proper sf page?

http://pypi.python.org/pypi/matplotlib

Yup, but the link URLs are of the form

    http://sourceforge.net/.../<foo>.egg/download

which does not obviously mean "this is the URL for <foo>.egg" unless if you know to remove the final /download part.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco