当我试图在Raspberry上安装OpenCV以进行对象检测时,我得到了以下错误:
pip配置了需要TLS/SSL的位置,但是Python中的ssl模块没有开放的ssl版本-OpenSSL 1.1.0f 2017年5月25日(库: OpenSSL 1.1.0j2018年11月20日)
我使用Python2.7作为全局包,并为OpenCV安装了所有软件包。
Pip版本:pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)
我使用pip3 install opencv-python安装OpenCV。
这是一个错误:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting opencv-python
Could not fetch URL https://pypi.python.org/simple/opencv-python/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not fetch URL https://www.piwheels.org/simple/opencv-python/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python发布于 2019-04-16 18:27:05
如果不自己构建OpenCV,就不能在Raspberry Pi上安装它。这就是获得错误No matching distribution found for opencv-python的原因。你得自己建在树莓派上。最近的版本也使用Python 3,您需要使用它,但是应该包含在Rasbian映像中。尝试python3 --version来找出答案。
这里有一个详细的指南,您可以在这里构建和安装OpenCV:https://www.learnopencv.com/install-opencv-4-on-raspberry-pi/
上面的网站也有一个脚本,你可以下载和使用,以安装它更容易。
https://stackoverflow.com/questions/55713900
复制相似问题