当前位置:网站首页>ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
2022-08-08 16:19:00 【Data+Science+Insight】
ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
目录
ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
问题:
出现此错误是因为numpy版本不正确/不兼容。众所周知,大多数机器学习和深度学习库都在Numpy之上。像cv2、matplotlib、PyTorch、pyinstaller等Python模块也是其中之一。当我们从它们中安装任何模块时,它会自动安装require NUMPY版本。但是当我们在它之后安装另一个包时,另一个模块可能会根据兼容的依赖关系更改NUMPY的版本。现在下次导入上一个模块时,可能会出现此错误。
解决:
numpy的版本的问题,升到1.8.0以上OK了。
解决此错误的直接方法是将现有的numpy模块更新到numpy 1.8.0或更高。升级numpy的方法很多。
pip uninstall numpy
pip install numpy==1.8.0
完整错误:
(python36) C:\Users>python test.py
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "C:\Users\test.py ", line 15, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\onda\envs\python36\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 658, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 922, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: numpy.core.multiarray failed to import
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 1, in
File "C:\Users\Reader.py", line 21, in
_kfbReader = swig_import_helper()
File "C:\Users\Reader.py", line 18, in swig_import_helper
return importlib.import_module('kfbReader')File "C:\Users\conda\envs\python36\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_Reader'
边栏推荐
- Kubernetes-基础-常用命令
- 程序发生run time error原因及解决方案
- 2020年适用于Linux的10个顶级开源缓存工具
- 线程本地存储 ThreadLocal
- Flutter的实现原理初探
- 成员变量和局部变量的区别?
- 【Unity入门计划】制作RubyAdventure02-处理瓦片地图&碰撞
- Jingdong T9 pure hand type 688 pages of god notes, SSM framework integrates Redis to build efficient Internet applications
- 使用 ansible-bender 构建容器镜像
- Patience sorting - specializing in quickly solving the longest increasing subarray
猜你喜欢
华为云分布式缓存服务Redis开通及使用规划教程【华为云至简致远】
Guanghong Technology: The company provides manufacturing services for Xiaomi, Samsung, OPPO, Nokia and other products in India
国产数据库的红利还能“吃”多久?
赶紧进来修内功!!!带你认识C语言中各种进制数和原码反码补码.
The realization of the salary slip issuing function of WeChat public account + web background
带你玩转“超大杯”ECS特性及实验踩坑【华为云至简致远】
Nuxt - 网站接入 51LA 网站统计(详细教程)
The origin and creation of Smobiler's complex controls
10分钟快速入门RDS【华为云至简致远】
All volunteers V853 chip Tina RTSP environment set up
随机推荐
常见的网络安全术语之一
[Unity entry plan] Unity instance - how to protect data members through encapsulation in C#
EMQ畅谈IoT数据基础软件开源版图,引领本土开源走向全球
jupyter notebook hide & show all output
9.cuBLAS开发指南中文版--cuBLAS中的原子模式的配置
Kubernetes资源编排系列之四: CRD+Operator篇
Kubernetes-Basics-Common Commands
MySQL数据库的简介及select语句的执行流程
The situation of the solution of the equation system and the correlation transformation of the vector group
赶紧进来修内功!!!带你认识C语言中各种进制数和原码反码补码.
抓住时代趋势,网赚新逻辑:平台+个人模式超清晰解读(附产品评测)
10 Top Open Source Caching Tools for Linux in 2020
bzoj3262 Flowers bloom on Mo
基于FTP协议的Excel文件上传与下载
bzoj2816 [ZJOI2012] Network
快速排序(C语言版)
全网首发!消息中间件神仙笔记,涵盖阿里十年技术精髓
基于华为云ModelArts的水表读数识别开发实践【华为云至简致远】
Teach you how to use uniapp to access chat and IM instant messaging - source code sharing
使用 FasterTransformer 和 Triton 推理服务器加速大型 Transformer 模型的推理