簡體   English   中英

無法安裝python包SSL證書問題

[英]Cant install python packages SSL certificate issue

嗨,我安裝了 python 版本 3.9.6 和 pip 版本 21.1.3。 我正在嘗試運行py -m pip install Django ,但出現以下錯誤:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/django/

WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/django/

WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/django/

WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/django/

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/django/

Could not fetch URL https://pypi.org/simple/django/: 
There was a problem confirming the ssl certificate: 
HTTPSConnectionPool(host='pypi.org', port=443): 
Max retries exceeded with url: /simple/django/ 
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - skipping

ERROR: Could not find a version that satisfies the requirement Django (from versions: none)
ERROR: No matching distribution found for Django

任何人都可以幫助我並告訴我如何解決這個問題。

我試圖關閉我的防病毒軟件,但沒有幫助

如果有人知道如何逐步導入 Django,我將無法在我的 cmd 上使用 openssl 它將對我非常有幫助,因為我是使用 python 的新手。

謝謝。

使用這個並工作

python -m pip install Django --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org

在這里找到

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM