Anaconda cannot import packages like numpy, scipy, theano, etc.

Without Anaconda, everything works fine. That is, I can import the above packages. But after installing Anaconda, I cannot import the same packages. Here is the error I get: -

>>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 199, in <module> from . import random File "/usr/local/lib/python2.7/dist-packages/numpy/random/__init__.py", line 99, in <module> from .mtrand import * ImportError: /usr/local/lib/python2.7/dist-packages/numpy/random /mtrand.so: undefined symbol: PyFPE_jbuf 
+5
source share
1 answer

After installing the Anaconda distribution, it adds .bashrc paths with the location of anaconda / bin. This means that any python packages installed in the / usr / local / directory may not be importable.

In the second recommendation above, I recommend using virtual environments to do your work. The Anaconda Python distribution includes conda package management. It can make your life easier.

You can create new environments and install packages not provided by the distribution using the conda assembly ( http://conda.pydata.org/docs/build_tutorials.html )

Also look at the pip and python wheel.

+1
source

Source: https://habr.com/ru/post/1242812/


All Articles