Python pip Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")


 Windows 10, Python 3.8

pip install opencv-python

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

 

解決辦法
 
前往下面地址,下載和安裝OpenSSL:
    https://slproweb.com/products/Win32OpenSSL.html

下載對應自己系統的OpenSSL的EXE安裝包,選擇的是 Win64 OpenSSL v1.1.1n (下載文件鏈接  https://slproweb.com/download/Win64OpenSSL-1_1_1n.exe ),安裝之后就可以正常使用了(安裝在默認路徑C盤)。采用迅雷下載比較快。

 

 

 ============================

安裝 cv2

 

E:\Eprogramfiles\Anaconda3\Scripts>python
Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

E:\Eprogramfiles\Anaconda3\Scripts>pip install opencv-python -i https://pypi.mirrors.ustc.edu.cn/simple/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM