conda 环境中opencv 报错以及其他报错

如题,通过 conda install opencv
然后遇到
ImportError: DLL load failed while importing cv2: 找不到指定的模块。

参考网络相关答案
通过conda 卸载
然后通过 pip3 安装opencv-pyhton

https://stackoverflow.com/questions/75387197/anaconda-importerror-dll-load-failed-while-importing-cv2-the-specified-module

然后还是遇到报错
Error || `ERROR: These packages do not match the hashes from the requirements file

参考
https://blog.csdn.net/weixin_61514920/article/details/139238042

https://zhuanlan.zhihu.com/p/438709381

尝试
pip cache purge
pip3 install opencv-python==4.10.0.82 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

成功 自此成功导入

回顾,之前都是通过 conda install 的包
第二天发现from matplotlib import pyplot as plt
也开始报错了
提示 ImportError: DLL load failed while importing _imaging: 找不到指定的模块

参考了
https://tencentcloud.csdn.net/67876a73edd0904849a53965.html

和上面的问题一样 卸载 matplitlib 然后通过 pip 重新下载
然后出现报错
ModuleNotFoundError: No module named ‘PIL’

然后
其实就是卸载当前的PIL 然后重新下载对应版本的
我的是python 3.10
pip install pillow==8.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
顺利运行

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值