4

I recently installed SciPy for Python3.4 on Ubuntu 12.04 with

pip3 install scipy

When I import scipy in Python3.4 as:

import scipy

it imports, but when I import the function interpolate as

import scipy.interpolate

I get the following error:

  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

How to fix this error in Python3?

Tom Kurushingal
  • 6,086
  • 20
  • 54
  • 86
  • pip install is usually problematic. Use gohlke's numpy+MKL and also scipy wheels from here http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy . This is the only way I could actually install these libraries so far. Also a related one is http://stackoverflow.com/questions/21991420/install-scipy-with-mkl-through-pip – percusse Jun 17 '16 at 22:01

1 Answers1

1

Numpy and Scipy are popular packages. You probably can find them in Ubuntu repository. So it's better to install them with apt-get but not pip.

If you want MKL support, I would suggest anaconda - a full Python distribution with MKL and other acceleration libraries integrated such as CUDA. This will make your life easier.

https://www.continuum.io/downloads

kangshiyin
  • 9,681
  • 1
  • 17
  • 29