欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

importcv2提示无cv2

时间:2023-04-21

执行命令:

./pip3 install opencv-python

如下:

(base) zx@zxdeMacBook-Air anaconda3 % cd bin (base) zx@zxdeMacBook-Air bin % ./pip3 install opencv-pythonCollecting opencv-python Downloading opencv_python-4.5.5.62-cp36-abi3-macosx_10_15_x86_64.whl (46.0 MB) |████████████████████████████████| 46.0 MB 103 kB/s Requirement already satisfied: numpy>=1.17.3 in /Users/zx/opt/anaconda3/lib/python3.9/site-packages (from opencv-python) (1.20.3)Installing collected packages: opencv-pythonSuccessfully installed opencv-python-4.5.5.62(base) zx@zxdeMacBook-Air bin % pwd/Users/zx/opt/anaconda3/bin

安装好后,Pycharm中import cv2就可以正常使用了。

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。