在python3简单地安装opencv
1.确认安装python3
python
系统显示:
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
这就确认了python3安装版本正确(这里用的是python3.6.2演示其他版本同理)2.安装opencv
重新以管理员模式打开cmd,(在确保联网状态下)在命令行输入:
pip install opencv-python
经过处理pip会自动安装opencv和所依赖的库,这样就好了3.验证是否正确安装opencv
pthon
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
import cv2
>>>
没有报错证明成功了4.拓展 常见cmd中pip工具指令
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
使用方式:pip [Commands]