python在import numpy出错
在cmd里面也提示正确安装了,重新安装的时候提示命令已经满足了,在环境变量里也看到了安装的两个路径在里面>>>importnumpyTraceback(mostrecen...
在cmd里面也提示正确安装了,重新安装的时候提示命令已经满足了,在环境变量里也看到了安装的两个路径在里面
>>> import numpy
Traceback (most recent call last):
File "C:\Python36-32\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: DLL load failed: 找不到指定的程序。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import numpy
File "C:\Python36-32\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Python36-32\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Python36-32\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Python36-32\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Python36-32\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
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: DLL load failed: 找不到指定的程序。 展开
>>> import numpy
Traceback (most recent call last):
File "C:\Python36-32\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: DLL load failed: 找不到指定的程序。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import numpy
File "C:\Python36-32\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Python36-32\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Python36-32\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Python36-32\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Python36-32\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
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: DLL load failed: 找不到指定的程序。 展开
1个回答
展开全部
NumPy系统是Python的一种开源的数值计算扩展。这种工具可用来存储和处理大型矩阵,比python自身的嵌套列表结构要高效的多。但是在使用Numpy时可能出错:ImportError: No module named numpy,解决办法,下载安装对应版本的Numpy程序。我的Python版本为2.7-64bit,可以下载对应的Numpy安装即可。
Python-Numpy2.7 64位版本:
将Numpy安装到Python的安装路径下:
再次导入Numpy:
Python-Numpy2.7 64位版本:
将Numpy安装到Python的安装路径下:
再次导入Numpy:
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询