编程语言
首页 > 编程语言> > python – 与MKL库的SciPy兼容性问题

python – 与MKL库的SciPy兼容性问题

作者:互联网

我最近在Ubuntu 12.04上安装了SciPy for Python3.4

pip3 install scipy

当我在Python3.4中导入scipy时:

import scipy

它导入,但当我导入函数插值为

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中修复此错误?

解决方法:

Numpy和Scipy是受欢迎的套餐.您可能可以在Ubuntu存储库中找到它们.所以最好用apt-get安装它们,但不要用pip安装它们.

如果您需要MKL支持,我建议使用anaconda – 一个完整的Python发行版,包含MKL和其他集成的加速库,如CUDA.这将使您的生活更轻松.

https://www.continuum.io/downloads

标签:python,scipy,python-3-4,intel-mkl
来源: https://codeday.me/bug/20190706/1395004.html