python - “从 numpy.core._multiarray_umath 导入”抛出错误“DLL 加载失败:找不到指定的模块。”
问题描述
我正在测试我的 numpy 安装。在 Python 提示符下,我尝试编写import numpy
. 但是它给出了以下错误。我正在使用蟒蛇。我已经使用 conda 命令安装了 numpyconda install numpy
Python 版本 3.7.7
numpy 版本 1.18.1
操作系统是 Win 10
日志:
>>> import numpy
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
from . import multiarray
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
from . import overrides
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 54, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
1. Check that you expected to use Python3.7 from "C:\ProgramData\Anaconda3\python.exe",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.18.1" you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: DLL load failed: The specified module could not be found.
解决方案
推荐阅读
- google-docs - 如何将当前文件的位置插入googl docs?
- javascript - 我如何只用传单显示一个县?还是重建这张地图?
- symfony - ApiFilter - Altername 参数名称
- c++ - 是否允许使用偏移量将内存复制到普通的可复制类型?
- vba - 使用 VBA 在 3DExperience 2018 中发布元素
- java - 如何从 timepickerdialog 设置最小时间到系统当前时间
- ruby-on-rails - 在公共/包中的轨道预编译资产未在 ec2 实例上的生产中提供
- python - AttributeError: 'NoneType' object has no attribute 'name' 当我尝试获取 docx 文件的标题时发生错误
- docker - NextJS 应用程序使用 Docker 和 NGINX 部署,所以我可以有一个自定义的基本路径
- google-cloud-platform - 某些列的 Google BigQuery bq 负载?