[AstroPy] import problem (matplotlib ? numpy ?) on Mac Intel, python 2.6

Perry Greenfield perry at stsci.edu
Mon May 16 11:28:08 EDT 2011


matplotlib or numpy aren't going to work with jython.

On May 16, 2011, at 11:02 AM, Jean-Baptiste Marquette wrote:

> Dear matplotlib/numpy gurus,
>
> This is my first attempt to use matplotlib & numpy, with the  
> following small piece of code:
>
> #!/usr/bin/env jython   **** jython because of the import of stilts  
> from starjava ****
>
> # Fabrique les figures des champs du papier Catalogue
>
>
> __author__="marquett"
> __date__ ="$16 mai 2011 12:17:08$"
>
> import sys
> sys.path.append('/star/starjava/etc/ttools')
> sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/ 
> lib/python2.6/site-packages')
> import stilts
> import glob
> import matplotlib.pyplot as plt
>
> I got the following trace:
>
> Traceback (most recent call last):
>   File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in  
> <module>
>     import matplotlib.pyplot as plt
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib/__init__.py", line 135, in <module>
>     from matplotlib.rcsetup import (defaultParams,
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib/rcsetup.py", line 19, in <module>
>     from matplotlib.colors import is_color_like
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib/colors.py", line 52, in <module>
>     import numpy as np
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/__init__.py", line 137, in <module>
>     import add_newdocs
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
>     from numpy.lib import add_newdoc
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/lib/__init__.py", line 4, in <module>
>     from type_check import *
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/lib/type_check.py", line 8, in <module>
>     import numpy.core.numeric as _nx
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/core/__init__.py", line 5, in <module>
>     import multiarray
> ImportError: No module named multiarray
>
> I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib.
>
> My so little experience tells me that this is a deep numpy issue  
> rather than a matplotlib one.
>
> Any hint welcome, thanks.
>
> JB Marquette
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy




More information about the AstroPy mailing list