我最近在Ubuntu 12.04上用
安装了SciPy for Python3.4pip3 install scipy
当我在Python3.4中导入scipy时:
import scipy
导入,但是当我导入函数interpolate为
时import scipy.interpolate
我收到以下错误:
File "test.py", line 55, in <module>
import scipy.interpolate
File "/home//.pyenv/versions/3.4.1/lib/python3.4/site-packages/scipy/interpolate/__init__.py", line 158, in <module>
from .interpolate import *
File "/home/nxkr/.pyenv/versions/3.4.1/lib/python3.4/site-packages/scipy/interpolate/interpolate.py", line 11, in <module>
import scipy.linalg
File "/home/nxkr/.pyenv/versions/3.4.1/lib/python3.4/site-packages/scipy/linalg/__init__.py", line 175, in <module>
from .basic import *
File "/home/nxkr/.pyenv/versions/3.4.1/lib/python3.4/site-packages/scipy/linalg/basic.py", line 21, in <module>
from ._solve_toeplitz import levinson
ImportError: /home/nxkr/.pyenv/versions/3.4.1/lib/python3.4/site-packages/scipy/linalg/_solve_toeplitz.cpython-34m.so: undefined symbol: _intel_fast_memcpy
如何在Python3中修复此错误?
答案 0 :(得分:1)
Numpy和Scipy是受欢迎的套餐。您可能可以在Ubuntu存储库中找到它们。所以最好用apt-get安装它们,但不要用pip安装它们。
如果您需要MKL支持,我建议使用anaconda - 一个完整的Python发行版,包含MKL和其他集成的加速库,如CUDA。这将使您的生活更轻松。