0

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?

Kevin
  • 3,077
  • 6
  • 31
  • 77
  • 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 Apr 13 '16 at 06:59
  • @Hun I did conda update --all – Kevin Apr 13 '16 at 07:00
  • 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 Apr 13 '16 at 07:03
  • @Hun doing this now, will reply with the version number and if it works – Kevin Apr 13 '16 at 07:05
  • @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 anaconda2 – Kevin Apr 13 '16 at 07:07

2 Answers2

1

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

Kevin
  • 3,077
  • 6
  • 31
  • 77
0

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

Huanfa Chen
  • 577
  • 6
  • 15