栏目分类:
子分类:
返回
文库吧用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
文库吧 > IT > 软件开发 > 后端开发 > Python

python 导入错误 ImportError: Unable to import required dependencies: numpy

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

python 导入错误 ImportError: Unable to import required dependencies: numpy

报错信息:

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.8 from "E:ProgramDataAnaconda3python.exe"
* The NumPy version is: "1.19.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: 找不到指定的模块。

报错提示其实很明显了:

The Python version is Python3.8
The Numpy version is 1.19.1

python 和 numpy 的版本不匹配。

报错原因分析:

anaconda自己安的numpy是1.19,python是3.8。两个版本不匹配,3.8应该对应1.18.2。

所以解决方案是卸载1.10安装1.18.2

解决方案:

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

转载请注明:文章转载自 www.wk8.com.cn
本文地址:https://www.wk8.com.cn/it/1038614.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 wk8.com.cn

ICP备案号:晋ICP备2021003244-6号