Python3.7中安装openCV库的方法
1.首先自己直接在cmd中输入 pip3 install openCV是不可行的,即需要自己下载安装包本地安装
2.openCV库 下载地址http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
3.opencv_python‑3.4.2‑cp37‑cp37m‑win_amd64.whl(cp37指的是python的版本,win_amd64是指python是64位的,也有可能有人64位的系统装了32位的python,这时候就需要装win32的版本)
4.下载完成后,在cmd中输入pip3 install 文件路径\opencv_python‑3.4.2‑cp37‑cp37m‑win_amd64.whl
5.如果出现错误opencv_python‑3.4.2‑cp37‑cp37m‑win_amd64.whl is not a supported wheel on this platform. 在cmd中可以通过下面的代码查询自己的python所能支持的版本,然后再选择适合自己的版本
#AMD_64 import pip._internal print(pip._internal.pep425tags.get_supported()) #Win32 import pip print(pip.pep425tags.get_supported()) [('cp37', 'cp37m', 'win_amd64'), ('cp37', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
总结
相关推荐
huavhuahua 2020-11-20
weiiron 2020-11-16
cakecc00 2020-11-15
千锋 2020-11-15
JakobHu 2020-11-14
guangcheng 2020-11-13
xirongxudlut 2020-11-10
solarLan 2020-11-09
pythonxuexi 2020-11-08
文山羊 2020-11-07
susmote 2020-11-07
wuShiJingZuo 2020-11-05
Pythonjeff远 2020-11-06
jacktangj 2020-11-04
lousir 2020-11-04
YENCSDN 2020-11-17
lsjweiyi 2020-11-17
houmenghu 2020-11-17
Erick 2020-11-17