在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]