numpy & compilation

Hi,

I am trying to compile matplotlib in order to use numpy as the numerix
option. I can apt-get a version of it which works, but it does not seem to
support numpy.

I also compiled numpy-1.0rc1 (released 2 weeks ago), and it works fine in
python. However, when I import matplotlib (0.87.6), I get the error
message below. A quick internet search suggests to me that it is some kind
of mismatch in libraries, possibly caused by compiler differences in g++ 4
(numpy at least seems to use g++.. so I tried a different g++ version,
but it made no difference).

Does someone have an idea what the problem is, or what I could try?

Thanks,
Allan

···

--------------------------------

The import of the numpy version of the _transforms module,
_ns_transforms, failed. This is is either because numpy was
unavailable when matplotlib was compiled, because a dependency of
_ns_transforms could not be satisfied, or because the build flag for
this module was turned off in setup.py. If it appears that
_ns_transforms was not built, make sure you have a working copy of
numpy and then re-install matplotlib. Otherwise, the following
traceback gives more details:

Traceback (most recent call last):
  File "/usr/bin/ipython", line 28, in ?
    IPython.Shell.start().mainloop()
  File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 883, in
start
    return shell()
  File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 810, in
__init__
    IPShellGTK.__init__(self,argv,user_ns,debug,shell_class=MatplotlibMTShell)
  File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 618, in
__init__
    on_kill=[mainquit])
  File "/usr/lib/python2.4/site-packages/IPython/ipmaker.py", line 85, in
make_IPython
    IP = shell_class('__IP',user_ns=user_ns,**kw)
  File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 500, in
__init__
    user_ns,b2 = self._matplotlib_config(name)
  File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 373, in
_matplotlib_config
    from matplotlib import backends
  File "/usr/lib/python2.4/site-packages/matplotlib/backends/__init__.py",
line 55, in ?
    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "/usr/lib/python2.4/site-packages/matplotlib/backends/__init__.py",
line 23, in pylab_setup
    globals(),locals(),[backend_name])
  File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 8, in ?
    from matplotlib.figure import Figure
  File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line 5, in ?
    from artist import Artist
  File "/usr/lib/python2.4/site-packages/matplotlib/artist.py", line 4, in ?
    from transforms import identity_transform
  File "/usr/lib/python2.4/site-packages/matplotlib/transforms.py", line
223, in ?
    from _transforms import Value, Point, Interval, Bbox, Affine
  File "/usr/lib/python2.4/site-packages/matplotlib/_transforms.py", line
17, in ?
    from matplotlib._ns_transforms import *
ImportError:
/usr/lib/python2.4/site-packages/matplotlib/_ns_transforms.so: undefined
symbol: _ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj

Hi

If you are on ubuntu you may check out Andrew Straw’s repository:
http://debs.astraw.com

Arnar

···

On 10/4/06, ahalda@…1282… <ahalda@…1282…> wrote:

Hi,

I am trying to compile matplotlib in order to use numpy as the numerix
option. I can apt-get a version of it which works, but it does not seem to
support numpy.

I also compiled numpy-1.0rc1 (released 2 weeks ago), and it works fine in

python. However, when I import matplotlib (0.87.6), I get the error
message below. A quick internet search suggests to me that it is some kind
of mismatch in libraries, possibly caused by compiler differences in g++ 4

(numpy at least seems to use g++… so I tried a different g++ version,
but it made no difference).

Does someone have an idea what the problem is, or what I could try?

Thanks,
Allan


The import of the numpy version of the _transforms module,
_ns_transforms, failed. This is is either because numpy was
unavailable when matplotlib was compiled, because a dependency of
_ns_transforms could not be satisfied, or because the build flag for

this module was turned off in setup.py. If it appears that
_ns_transforms was not built, make sure you have a working copy of
numpy and then re-install matplotlib. Otherwise, the following
traceback gives more details:

Traceback (most recent call last):
File “/usr/bin/ipython”, line 28, in ?
IPython.Shell.start().mainloop()
File “/usr/lib/python2.4/site-packages/IPython/Shell.py”, line 883, in

start
return shell()
File “/usr/lib/python2.4/site-packages/IPython/Shell.py”, line 810, in
init
IPShellGTK.init(self,argv,user_ns,debug,shell_class=MatplotlibMTShell)
File “/usr/lib/python2.4/site-packages/IPython/Shell.py”, line 618, in

init
on_kill=[mainquit])
File “/usr/lib/python2.4/site-packages/IPython/ipmaker.py”, line 85, in
make_IPython
IP = shell_class(‘__IP’,user_ns=user_ns,**kw)
File “/usr/lib/python2.4/site-packages/IPython/Shell.py”, line 500, in

init
user_ns,b2 = self._matplotlib_config(name)
File “/usr/lib/python2.4/site-packages/IPython/Shell.py”, line 373, in
_matplotlib_config
from matplotlib import backends
File “/usr/lib/python2.4/site-packages/matplotlib/backends/init.py”,

line 55, in ?
new_figure_manager, draw_if_interactive, show = pylab_setup()
File “/usr/lib/python2.4/site-packages/matplotlib/backends/init.py”,
line 23, in pylab_setup
globals(),locals(),[backend_name])

File
“/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py”,
line 8, in ?
from matplotlib.figure import Figure
File “/usr/lib/python2.4/site-packages/matplotlib/figure.py”, line 5, in ?

from artist import Artist

File “/usr/lib/python2.4/site-packages/matplotlib/artist.py”, line 4, in ?
from transforms import identity_transform
File “/usr/lib/python2.4/site-packages/matplotlib/transforms.py”, line

223, in ?
from _transforms import Value, Point, Interval, Bbox, Affine
File “/usr/lib/python2.4/site-packages/matplotlib/_transforms.py”, line
17, in ?
from matplotlib._ns_transforms import *

ImportError:
/usr/lib/python2.4/site-packages/matplotlib/_ns_transforms.so: undefined
symbol: _ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
[

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users