Can not import numpy and scipy in jupyter.

481 views
Skip to first unread message

苏张

unread,
Dec 30, 2015, 11:11:36 AM12/30/15
to Project Jupyter
Hi all,

I'm using a macbook with anaconda and canopy. I can import numpy and scipy in the terminal environment for python.

But in jupyter,

when I import numpy, I got the message:

ImportError: dlopen(/Users/zhangsumac/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so, 2): Library not loaded: @rpath/lib/libmkl_intel_lp64.dylib
  Referenced from: /Users/zhangsumac/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so 
Reason: image not found

when I import scipy, I got the message:

ImportError: cannot import name scimath

I think the jupyter should import numpy and scipy in the anaconda's directory, while it imports them from the Canopy's directory. But I don't know how to set the lib path. 

Could any one help me fix the problem?

Thanks.

Franklin
 

苏张

unread,
Dec 30, 2015, 10:35:35 PM12/30/15
to Project Jupyter
I have changed the path of python, now I still can not import numpy:

/Users/zhangsumac/anaconda/lib/python2.7/site-packages/numpy/lib/__init__.py in <module>()
     15 from .ufunclike import *
     16 
---> 17 from . import scimath as emath
     18 from .polynomial import *
     19 #import convertcode


ImportError: cannot import name scimath


在 2015年12月31日星期四 UTC+8上午12:11:36,苏张写道:

苏张

unread,
Dec 30, 2015, 11:08:01 PM12/30/15
to Project Jupyter

Hi all,
I have fixed this problem by uninstalling Canopy.

Thanks.


在 2015年12月31日星期四 UTC+8上午12:11:36,苏张写道:
Hi all,
Reply all
Reply to author
Forward
0 new messages