import numpy fails with multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode
Hello, I have installed the svn version of numpy. I have deleted all previous versions of and files related to numpy prior to installing. I also have tried reinstalling python from source. Regardless, when I try import numpy, I get the following: Python 2.5.2 (r252:60911, Jul 23 2008, 23:54:29) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line 93, in <module> import add_newdocs File "/usr/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, in <module> from lib import add_newdoc File "/usr/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 4, in <module> from type_check import * File "/usr/local/lib/python2.5/site-packages/numpy/lib/type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "/usr/local/lib/python2.5/site-packages/numpy/core/__init__.py", line 5, in <module> import multiarray ImportError: /usr/local/lib/python2.5/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode I also tried compiling python using ./configure --enable-unicode=ucs4 with no luck. I had python and numpy all working well but then some file got corrupted so I was forced to reinstall, and I have not yet been able to get things working again after two days of attempts. Thank you, G
On Thu, Jul 24, 2008 at 02:21, G <jones_gl@caltech.edu> wrote:
Hello, I have installed the svn version of numpy. I have deleted all previous versions of and files related to numpy prior to installing. I also have tried reinstalling python from source. Regardless, when I try import numpy, I get the following:
Are you sure you are getting the same python executable when running the setup.py as you are when you build numpy? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Robert Kern <robert.kern <at> gmail.com> writes:
Are you sure you are getting the same python executable when running the setup.py as you are when you build numpy?
I believe so: sudo which python /usr/local/bin/python which python /usr/local/bin/python which ipython /usr/local/bin/ipython head /usr/local/bin/ipython #!/usr/local/bin/python I managed to get numpy 1.1.0 to compile and work correctly, so perhaps I somehow have files left around in the svn directory from building with another version of python. I will have to try the svn version again later. Thanks for the suggestion, G
G wrote:
Hello, I have installed the svn version of numpy. I have deleted all previous versions of and files related to numpy prior to installing. I also have tried reinstalling python from source. Regardless, when I try import numpy, I get the following:
Python 2.5.2 (r252:60911, Jul 23 2008, 23:54:29) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line 93, in
<module> import add_newdocs File "/usr/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, in <module> from lib import add_newdoc File "/usr/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 4,
in <module> from type_check import * File "/usr/local/lib/python2.5/site-packages/numpy/lib/type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "/usr/local/lib/python2.5/site-packages/numpy/core/__init__.py", line 5, in <module> import multiarray ImportError: /usr/local/lib/python2.5/site-packages/numpy/core/multiarray.so:
undefined symbol: PyUnicodeUCS2_FromUnicode
This symbol is defined by Python when you build Python with 16-bit unicode support (as opposed to 32-bit) unicode support. Somehow numpy is picking up the 16-bit headers but you probably compiled with ucs4. NumPy supports both UCS2 and UCS4 builds. This looks to me like a Python header installation problem. There are probably some incorrect Python headers being picked up during compilation of NumPy. Can you double check which Python headers are being used (look at the -I lines when NumPy is being built). -Travis
Did you build Python from sources in such a way that the Python library is a shared one? I mean, Do you have the file /usr/local/lib/libpython2.5.so ?? On Thu, Jul 24, 2008 at 4:21 AM, G <jones_gl@caltech.edu> wrote:
Hello, I have installed the svn version of numpy. I have deleted all previous versions of and files related to numpy prior to installing. I also have tried reinstalling python from source. Regardless, when I try import numpy, I get the following:
Python 2.5.2 (r252:60911, Jul 23 2008, 23:54:29) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line 93, in
<module> import add_newdocs File "/usr/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, in <module> from lib import add_newdoc File "/usr/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 4,
in <module> from type_check import * File "/usr/local/lib/python2.5/site-packages/numpy/lib/type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "/usr/local/lib/python2.5/site-packages/numpy/core/__init__.py", line 5, in <module> import multiarray ImportError: /usr/local/lib/python2.5/site-packages/numpy/core/multiarray.so:
undefined symbol: PyUnicodeUCS2_FromUnicode
I also tried compiling python using ./configure --enable-unicode=ucs4 with no luck. I had python and numpy all working well but then some file got corrupted so I was forced to reinstall, and I have not yet been able to get things working again after two days of attempts.
Thank you, G
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
-- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
participants (4)
-
G
-
Lisandro Dalcin
-
Robert Kern
-
Travis E. Oliphant