ImportError: Unable to import required dependencies:
numpy:
 
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
 
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
 
We have compiled some common reasons and troubleshooting tips at:
 
https://numpy.org/devdocs/user/troubleshooting-importerror.html
 
Please note and check the following:
 
* The Python version is: Python3.7 from "D:\tools\Anaconda\envs\pytorch\python.exe"
* The NumPy version is: "1.21.2"
 
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
 
Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

看这个报错信息,是python版本与Numpy版本不匹配,
我这Python3.7版本 应该匹配Numpy1.16.4版本
因此卸载NumPy1.21.2,重新安装。

1、打开Anaconda Prompt的命令行窗口
2、输入 pip uninstall numpy。 卸载 numpy 1.21.2
3、pip install numpy==1.16.4。 安装numpy 1.16.4
成功后关闭Anaconda Prompt的命令行窗口再重新打开即可

问题已解决
在这里插入图片描述

GitHub 加速计划 / de / Dependencies
8.6 K
704
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:1 个月前 )
1997a400 - 2 年前
2f423539 - 2 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐