PyCharm中安装opencv-python

PyCharm中安装opencv-python

(1)在https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv下载对应python版本和windows系统opencv的whl文件,例如我的系统是win11+64位+python3.8,于是下载的 opencv_python‑4.5.5‑cp38‑cp38‑win_amd64.whl
PyCharm中安装opencv-python_第1张图片
下载后放在你环境下面的…\Lib\site-packages文件夹下
例如我的是"C:\Users\11850\Anaconda3\envs\py15\Lib\site-packages\opencv_python-4.5.5-cp38-cp38-win_amd64.whl"
(2)按win+R打开cmd,输入:conda activate py15激活你安装的环境
PyCharm中安装opencv-python_第2张图片
之后用pip安装,输入pip install C:\Users\11850\Anaconda3\envs\py15\Lib\site-packages\opencv_python-4.5.5-cp38-cp38-win_amd64.whl
看见successfully installed…,就安装成功了,如图:请添加图片描述
(3)在cmd下输入conda list 就可以看到所安装的包中有opencv-python
PyCharm中安装opencv-python_第3张图片

你可能感兴趣的:(pycharm,opencv)