在 Ubuntu (12.04) 下,使用 openblas 将 python (2.7.5) 和 numpy (1.8rc2) 安装到自己的环境 (/din) 中。numpy site.cfg 文件配置为指向 openblas,编译为:
$ python setup.py build
$ sudo python setup.py install --prefix=/home/Programs/din/local
$ python
Python 2.7.5 (default, Oct 24 2013, 15:33:08)
[GCC 4.6.3] 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 "/home/Programs/din/local/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
import add_newdocs
File "/home/Programs/din/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/home/Programs/din/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module>
from type_check import *
File "/home/Programs/din/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "/home/Programs/din/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 5, in <module>
import multiarray
ImportError:
"/home/Programs/din/local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: ERR_peek_last_error
Cython、gevent 和其他 python 包都已成功安装到 /din 但不是 numpy。$PATH 和 python sys.path 已经过检查,看起来都不错。
有没有人有想法可以尝试?