UNIX_import pyplot:_path.so: symbol _ZNSs4_Rep20_S_empty_rep_storageE:referenced symbol not found

Hi everyone,

After having compiling and installing Matplotlib 1.0.1 with Python 2.5.5 on a Unix platform sunos5, I ran into the following problem, when trying to import pyplot or pylab.

Here is the ouput when using ipython:

co200009@…3409…$ ipython
WARNING: Readline services not available on this platform.
WARNING: The auto-indent feature requires the readline library
Python 2.5.5 (r255:77872, Jan 14 2011, 11:05:26)
Type “copyright”, “credits” or “license” for more information.

IPython 0.10.1 – An enhanced Interactive Python.
? -> Introduction and overview of IPython’s features.
%quickref -> Quick reference.
help -> Python’s own help system.
object? -> Details about ‘object’. ?object also works, ?? prints more.

[~/PYTHON-2.5/bin]

1>import numpy

[~/PYTHON-2.5/bin]

···

2>import matplotlib.pyplot as plt


ImportError Traceback (most recent call last)

/home/co200009/PYTHON-2.5/bin/ in ()

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/pyplot.py in ()
21 from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike
22 from matplotlib import docstring
—> 23 from matplotlib.figure import Figure, figaspect
24 from matplotlib.backend_bases import FigureCanvasBase
25 from matplotlib.image import imread as _imread

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/figure.py in ()
14 import numpy as np
15
—> 16 import artist
17 from artist import Artist, allow_rasterization
18 from axes import Axes, SubplotBase, subplot_class_factory

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/artist.py in ()
4 import matplotlib.cbook as cbook
5 from matplotlib import docstring, rcParams
----> 6 from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
7 from path import Path
8

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/transforms.py in ()
32 import numpy as np
33 from numpy import ma
—> 34 from matplotlib._path import affine_transform
35 from numpy.linalg import inv
36

ImportError: ld.so.1: ipython: fatal: relocation error: file /home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/_
path.so: symbol _ZNSs4_Rep20_S_empty_rep_storageE: referenced symbol not found

[~/PYTHON-2.5/bin]

3>import pylab


ImportError Traceback (most recent call last)

/home/co200009/PYTHON-2.5/bin/ in ()

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/pylab.py in ()
----> 1 from matplotlib.pylab import *
2 import matplotlib.pylab
3 doc = matplotlib.pylab.doc

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/pylab.py in ()
218 silent_list, iterable, dedent
219
–> 220 from matplotlib import mpl # pulls in most modules
221
222 from matplotlib.dates import date2num, num2date,\

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/mpl.py in ()
2 from matplotlib import axis
3 from matplotlib import axes
4 from matplotlib import cbook
5 from matplotlib import collections
6 from matplotlib import colors

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/artist.py in ()
4 import matplotlib.cbook as cbook
5 from matplotlib import docstring, rcParams
----> 6 from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
7 from path import Path
8

/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/transforms.py in ()
32 import numpy as np
33 from numpy import ma
—> 34 from matplotlib._path import affine_transform
35 from numpy.linalg import inv
36

ImportError: ld.so.1: ipython: fatal: relocation error: file /home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/_path.so: symbol _ZNSs4_Rep20_S_empty_rep_storageE: referenced symbol not found

Could anyone help me to solve this problem?

Thanks a lot,

Best Regards, Clément

Clément PORNET, on 2011-01-18 18:39, wrote:

Hi everyone,After having compiling and installing Matplotlib 1.0.1 with Python 2.5.5 on a Unix platform sunos5, I ran into the following problem, when trying to import pyplot or pylab.Here is the ouput when using ipython:

ImportError: ld.so.1: ipython: fatal: relocation error: file
/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/matplotlib/_path.so:
symbol _ZNSs4_Rep20_S_empty_rep_storageE: referenced symbol not
found

Clément,

this is likely due to a misbuilt matplotlib - have you update
numpy since you last built matplotlib?

Can you try deleting ../site-packages/matplotlib, and the build/
directory for your sources of mpl1.0.1 and reinstall? Please
report back either way so we get a handle on this.

best,

···

--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7

Paul,

Thanks for your quick
response to help me handling this problem. As proposed, I removed the
Matplotlib module (and the /build) and reinstalled it. Unfortunately I still
obtain the same import error. I use the latest Numpy version 1.5.1.

To compile Matplotlib
I use gcc. For instance to compile path.cpp:

gcc
-L/home/co200009/mylib/lib -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -fPIC -I/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/numpy/core/include
-I/usr/include -I/home/co200009/mylib/include -I.
-I/home/co200009/PYTHON-2.5/lib/python2.5/site-packages/numpy/core/include
-Isrc -Iagg24/include -I. -I/home/co200009/PYTHON-2.5/include/python2.5 -c
src/path.cpp -o build/temp.solaris-2.8-sun4u-2.5/src/path.o

Thanks in advance for
your further help,

Clément