- 安装virtualenv venv
找到F:\PythonProgram
Cmd
pip install virtualenv
virtualenv venv
进入虚拟环境venv\Scripts\
Cmd
activate 激活
pip install opencv-python==3.4.1.15装不上 并且3.4.2之后有些算法申请了专利,用不了了。
改成
pip install opencv-python==3.4.0.14
安装opencv扩展包
pip install opencv-contrib-python==3.4.0.14
装不了去:https://www.lfd.uci.edu/~gohlke/pythonlibs/下载相应的包手动安装
发现还是装不上opencv
查阅资料
解决在Anaconda中安装opencv-python==3.4.1.15出错问题,解决opencv下载问题_Sk_stream的博客-CSDN博客_opencv 3.4.1.15
重装了Anaconda
安装pip install virtualenv 发现pip 版本低了
python -m pip install --upgrade pip 更新pip
再安装报错
pip install msgpack
pip install --ignore-installed filelock
Python虚拟环境安装成功
可进入第一步,创建虚拟环境
提示:
虚拟环境里有opencv jupyter matplotlib
测试
ipython
import cv2
cv2.__version__
cd ../.. 进入上上一级目录
Attempting uninstall: terminado
Found existing installation: terminado 0.8.1
ERROR: Cannot uninstall 'terminado'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
pip install 包名 --ignore-installed terminado
每次从虚拟机启动都需要
F:\PythonProgram\venv\Scripts 目录下
CMD
activate
exit()
cd ../..
jupyter notebook
- OpenCV 图片视频