Error installing and using numpy

I have unicode problems trying to start numpy.

As stated here and here, using python with 4-byte Unicode, I downloaded the numpy 1.6.1 source code and ran the python installer:

in the numpy source directory:

which python /usr/local/bin/python python -c 'import sys; print sys.maxunicode' 1114111 python setup.py build python setup.py install cd ~ python -c 'import numpy' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python2.6/site-packages/numpy/__init__.py", line 137, in <module> import add_newdocs File "/usr/local/lib/python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module> from lib import add_newdoc File "/usr/local/lib/python2.6/site-packages/numpy/lib/__init__.py", line 4, in <module> from type_check import * File "/usr/local/lib/python2.6/site-packages/numpy/lib/type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "/usr/local/lib/python2.6/site-packages/numpy/core/__init__.py", line 5, in <module> import multiarray ImportError: /usr/local/lib/python2.6/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_AsASCIIString 

Since I'm compiling numpy with python 4-byte Unicode support, I don't understand why I have 2-byte Unicode error in numpy

Environment:

  • Debian 6 64 bit
  • Python 2.6.8
  • Numpy 1.6.1

Any tips on this will be appreciated.

0
source share
1 answer

Somehow I managed to get this work done: it was a very dirty environment, and there was a solution to start from scratch.

0
source

Source: https://habr.com/ru/post/1469135/


All Articles