安装和使用numpy时出错

时间:2012-04-25 20:05:03

标签: python unicode numpy debian

我正在尝试运行numpy的unicode麻烦。

如指向herehere我正在使用带有4字节unicode的python,我下载了numpy 1.6.1源代码并运行python安装程序:

在numpy源目录中:

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

由于我正在使用4字节python unicode支持编译numpy,我不明白为什么我在numpy中有2字节的unicode错误

环境:

  • Debian 6 64位
  • Python 2.6.8
  • Numpy 1.6.1

任何有关此问题的线索都将是apreciated

1 个答案:

答案 0 :(得分:0)

不知何故,我设法让这个工作:环境非常混乱,从头开始是解决方案。