0
votes

When I try to run this: import numpy as np in python I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kevin/anaconda2/lib/python2.7/site-packages/numpy/__init__.py", line 201, in <module>
    from . import random
  File "/home/kevin/anaconda2/lib/python2.7/site-packages/numpy/random/__init__.py", line 99, in <module>
    from .mtrand import *
ImportError: /home/kevin/anaconda2/lib/python2.7/site-packages/numpy/random/mtrand.so: undefined symbol: PyFPE_jbuf

I am running ubuntu 16.04 and have 2 python installations. I have also installed anaconda:

kevin@phantom:~$ which python
/home/kevin/anaconda2/bin/python

I did a conda update --all and I now have:

kevin@phantom:~$ python --version
Python 2.7.11 :: Anaconda custom (64-bit)

What am I doing wrong? What can I do to fix this issue?

2
Usually python --version command gives Anaconda version number like Python 3.5.1 :: Anaconda 4.0.0 (64-bit). How did you get anaconda custom version? That raises a red flag.Hun
@Hun I did conda update --allKevin
If I were you I would reinstall anaconda from scratch. And make sure it doesn't have a custom version but have some standard anaconda version number.Hun
@Hun doing this now, will reply with the version number and if it worksKevin
@Hun Wow, I did nothing but reinstall (this was like the 3rd time I reinstalled it) and it worked... Only thing different was me removing the last line in the .bashrc pertaining to the path for anaconda2Kevin

2 Answers

1
votes

I reinstalled anaconda and it worked for some reason...

0
votes

I created a new environment in anaconda and installed numpy in the new env. It worked.