Without installing Anaconda, everything works fine. That is, I am able to import the above mentioned packages. But after installing Anaconda, I am not able to import the same packages. Here is the error which 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
Once you install the Anaconda distribution it appends the .bashrc paths with the location of the anaconda/bin. This means that any python packages installed in the /usr/local/ may not be importable.
I second the suggestion above and recommend using virtual environments to do your work. The Anaconda Python distribution comes with conda package management. This may make your life easier.
You can create a new environments and install packages not provided by the distribution using conda build(http://conda.pydata.org/docs/build_tutorials.html)
Also look at pip and python wheel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With