I’m trying to set up pylab on my mac 10.6.7 32 bit machine; using virutalenv to isolate what I’m doing from everything else (coming from a ruby/rvm background this just makes me feel better–but I’m open to correction if it’s not the “python way”).
I have the following modules/libs installed:
DateUtils-0.5.1-py2.7.egg-info numpy-1.5.1-py2.7.egg-info
IPython pip-0.8.3-py2.7.egg
configobj.py pylab.py
configobj.pyc pylab.pyc
dateutil pymc
dateutils pymc-2.1beta-py2.7.egg-info
easy-install.pth python_dateutil-2.0-py2.7.egg-info
enthought pytz
ipython-0.10.1-py2.7.egg-info pytz-2011e-py2.7.egg-info
matplotlib scipy
matplotlib-0.91.1-py2.7.egg-info scipy-0.9.0-py2.7.egg-info
nose setuptools-0.6c11-py2.7.egg
nose-1.0.0-py2.7.egg-info setuptools-0.6c12dev_r88795-py2.7.egg
numpy setuptools.pth
The only one I can’t account for is enthought; I have never installed their python solution -must be a dependency of something else.
Numpy appears to be working just fine, matplotlib can be imported without issue; both from a shell. When I call just plain ipython no trouble either. But when I try and use pylab I python chokes on numpy.core.ma as in:
File "/Users/davidbgonzalez/.virtualenvs/VirtPy27/lib/python2.7/site-packages/matplotlib/numerix/ma/__init__.py", line 16, in <module>
from numpy.core.ma import *
ImportError: No module named ma
Backing into this I opened the __init__.py and a prompt as alluded to here. Sure enough, ma is found in numpy.ma not numpy.core.ma; verified via import numpy.ma.
I change the offending line:
from numpy.core.ma import * -> from numpy.ma import *
And get a new, very similar, error:
File "/Users/davidbgonzalez/.virtualenvs/VirtPy27/lib/python2.7/site-packages/matplotlib/numerix/npyma/__init__.py", line 7, in <module>
from numpy.core.ma import *
ImportError: No module named ma
But when I change that instance of numpy.core.ma to numpy.ma I get a dreadful:
Bus error
I’m open to any solutions.
You appear to have a extremely old version of Matplotlib installed. I’m not sure where you got it, but the current version (1.0.1) can be downloaded from http://matplotlib.sourceforge.net/