鍍金池/ 問答/數(shù)據(jù)分析&挖掘  Python/ 安裝了anaconda3,自帶numpy庫,但不能導入,問題出在哪里?

安裝了anaconda3,自帶numpy庫,但不能導入,問題出在哪里?

是我在jupter notebook網(wǎng)頁上輸入import numpy后,顯示ImportError,但我已經(jīng)安裝了numpy庫。
以下是錯誤的信息:

ImportError Traceback (most recent call last) 
~\AppData\Roaming\Python\Python36\site-packages\numpy\core__init__.py in () 
15 try: 
---> 16 from . import multiarray 
17 except ImportError as exc: 
ImportError: cannot import name 'multiarray' 
During handling of the above exception, another exception occurred: 
ImportError Traceback (most recent call last) 
in () 
----> 1 import numpy 
~\AppData\Roaming\Python\Python36\site-packages\numpy__init__.py in () 
140 return loader(*packages, **options) 
141 
--> 142 from . import add_newdocs 
143 all = ['add_newdocs', 
144 'ModuleDeprecationWarning', 
~\AppData\Roaming\Python\Python36\site-packages\numpy\add_newdocs.py in () 
11 from future import division, absolute_import, print_function 
12 
---> 13 from numpy.lib import add_newdoc 
14 
15 ############################################################################### 
~\AppData\Roaming\Python\Python36\site-packages\numpy\lib__init__.py in () 
6 from numpy.version import version as version 
7 
----> 8 from .type_check import * 
9 from .index_tricks import * 
10 from .function_base import * 
~\AppData\Roaming\Python\Python36\site-packages\numpy\lib\type_check.py in () 
9 'common_type'] 
10 
---> 11 import numpy.core.numeric as _nx 
12 from numpy.core.numeric import asarray, asanyarray, array, isnan, zeros 
13 from .ufunclike import isneginf, isposinf 
~\AppData\Roaming\Python\Python36\site-packages\numpy\core__init__.py in () 
24 Original error was: %s 
25 """ % (exc,) 
---> 26 raise ImportError(msg) 
27 
28 for envkey in env_added: 
ImportError: 
Importing the multiarray numpy extension module failed. Most 
likely you are trying to import a failed build of numpy. 
If you're working with a numpy git repo, try git clean -xdf (removes all 
files not under version control). Otherwise reinstall numpy. 
Original error was: cannot import name 'multiarray' 

問題補充:1.我已經(jīng)在網(wǎng)上搜索了的問題,有人說需要卸載numpy庫后重新裝,試了但不管用,同時,我又重裝了anaconda,也不管用。

2.我的電腦上還同時安裝了獨立的python3,python2。python3是默認系統(tǒng)。

回答
編輯回答
痞性

如果你是windows系統(tǒng)應(yīng)該看看環(huán)境變量是不是設(shè)置到了anaconda的目錄下
如果你是linux系統(tǒng)應(yīng)該看看是不是設(shè)置了軟鏈到anaconda的python

2017年11月13日 14:36
編輯回答
刮刮樂

看情況是你安裝的numpy有問題,是沒法導入multiarray這個包

2017年1月29日 07:56
編輯回答
瘋子范

問題解決了嗎?

2017年11月10日 07:05