CCXX2017 2017-11-21 01:46 采纳率: 0%
浏览 19459

安装了anaconda3,自带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.我已经在网上搜索了的问题,有人说需要卸载numpy库后重新装,试了但不管用,同时,我又重装了anaconda,也不管用。
2.我的电脑上还同时安装了独立的python3,python2。python3是默认系统。

  • 写回答

2条回答 默认 最新

  • cloud_code 2018-03-04 06:38
    关注

    试试从这里https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy 下载到本地, 用pip install 下载文件路径 方式安装,
    同时,试试numpy‑1.14.1+mkl‑cp35‑cp35m‑win_amd64.whl 这种带mkl的和不带mkl的:
    还有这句话: Many binaries depend on numpy-1.13+mkl and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.7), Visual C++ 2010 (x64, x86, for CPython 3.4), or the Visual C++ 2017 (x64 or x86 for CPython 3.5, 3.6, and 3.7) redistributable packages.

    评论

报告相同问题?

悬赏问题

  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了
  • ¥15 python:excel数据写入多个对应word文档