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

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

import matplotlib.pyplot as plt

File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/init.py”, line 135, in

from matplotlib.rcsetup import (defaultParams,

File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py”, line 19, in

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

import numpy as np

File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/init.py”, line 137, in

import add_newdocs

File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py”, line 9, in

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

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

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

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

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@...177...
http://mail.scipy.org/mailman/listinfo/astropy

Hi Jean-Baptiste,

I don't think numpy is currently supported by Jython.

I do not know exactly what is your use of starjava, but you might

want to have a look at AtPy () which does a
pretty good job at manipulating (astronomical) tables.
Cheers,
Thomas Boch

···

http://atpy.github.com/

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

import matplotlib.pyplot as plt

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/init.py”,
line 135, in

from matplotlib.rcsetup import (defaultParams,

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py”,
line 19, in

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

import numpy as np

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/init.py”,
line 137, in

import add_newdocs

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py”,
line 9, in

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

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

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

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

  -- Thomas Boch
CDS/Observatoire Astronomique Phone : 33 (0)3 68 85 24 42
11, rue de l'Universite Fax : 33 (0)3 68 85 24 17
F-67000 Strasbourg Email : France

AstroPy@…177…http://mail.scipy.org/mailman/listinfo/astropythomas.boch@…3606…http://cdsweb.u-strasbg.fr/~boch

Hi Thomas,

AtPy looks great. My only concern with starjava was to use stilts functionalities for managing ascii tables and coordinates transformations from degrees to sexagesimal and reverse. But I guess that AtPy deals with headers having a leading “#” and names of columns, like

id ra_min ra_max dec_min dec_max

and that pywcs can do transformations. So I can switch to pure python scripts.

Cheers,

JB

···

http://atpy.github.com/

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

import matplotlib.pyplot as plt

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/init.py”,
line 135, in

from matplotlib.rcsetup import (defaultParams,

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py”,
line 19, in

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

import numpy as np

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/init.py”,
line 137, in

import add_newdocs

      File

“/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py”,
line 9, in

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

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

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

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@…177…http://mail.scipy.org/mailman/listinfo/astropy

  -- Thomas Boch
CDS/Observatoire Astronomique Phone : 33 (0)3 68 85 24 42
11, rue de l'Universite Fax : 33 (0)3 68 85 24 17
F-67000 Strasbourg Email : France

thomas.boch@…3606…http://cdsweb.u-strasbg.fr/~boch