Original error was: cannot import name 'multiarray'

嗯,是这样的,原本电脑安装了python2.7和python3.6
用numpy这些库是用得了的,可是最近下载了最新版的anaconda(python3.7.0 Anaconda 5.3.0 64-bit) 然后就用不了这些库了
老是提醒下面的这一大段代码,请问怎么解决呢?

ImportError                               Traceback (most recent call last)
~\AppData\Roaming\Python\Python36\site-packages\numpy\core\__init__.py in <module>
     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)
<ipython-input-1-0aa0b027fcb6> in <module>
----> 1 import numpy as np

~\AppData\Roaming\Python\Python36\site-packages\numpy\__init__.py in <module>
    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 <module>
     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 <module>
      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 <module>
      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 <module>
     24 Original error was: %s
     25 """ % (exc,)
---> 26     raise ImportError(msg)
     27 finally:
     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'
阅读 4.7k
1 个回答

错误提示已经说了可能的原因是因为你尝试导入一个不成功build的numpy,当然也有可能是版本冲突。
你尝试重新安装以下numpy

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题