【问题标题】:Issues Install Django in my Current python -V Python 3.9.6在我当前的 python -V Python 3.9.6 中安装 Django 的问题
【发布时间】:2021-11-15 14:23:26
【问题描述】:

我在安装 Django 时遇到问题。 ERROR: No matching distribution found for django

C:\Users\rajesh-kumar>python -V
Python 3.9.6

C:\Users\rajesh-kumar>pip -V
pip 21.1.3 from c:\users\rajesh-kumar\appdata\local\programs\python\python39\lib\site-packages\pip (python 3.9)

C:\Users\rajesh-kumar>pip install django
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_ssl.c:1129)'))': /simple/django/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_ssl.c:1129)'))': /simple/django/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_ssl.c:1129)'))': /simple/django/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_ssl.c:1129)'))': /simple/django/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_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(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_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
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(SSLError(1, '[SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_ssl.c:1129)'))) - skipping

【问题讨论】:

标签: python django pip


【解决方案1】:

试试这个

pip3 install virtualenv

之后

virtualenv venv

然后激活你的环境

source  venv/bin/activate

现在你可以安装 Django,我认为这是更好的方式和安全,而不是在全局系统中安装 django。

pip install django

【讨论】:

    猜你喜欢
    • 2021-10-06
    • 1970-01-01
    • 2021-09-27
    • 1970-01-01
    • 1970-01-01
    • 2022-06-25
    • 2021-09-22
    • 2020-01-29
    • 2022-09-30
    相关资源
    最近更新 更多