Upgrading pip/installing django - [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

ぃ、小莉子 提交于 2020-07-09 11:38:42

问题


I am having issues with installing django and upgrading pip. I don't know how I began running into these issues, but when I go to type django-admin startproject mysite it gives me an error:

-bash: django-admin: command not found

I go ahead and type pip install Django and I then receive this error:

Could not fetch URL https://pypi.python.org/simple/django/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping

When upgrading pip...

Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping

I believe the issue lies within [SSL: TLSV1_ALERT_PROTOCOL_VERSION]. I don't know how to go about fixing it so that I can use django and upgrade my pip version.

If I type python3 -c "import ssl; print(ssl.OPENSSL_VERSION)", I get OpenSSL 1.0.2n 7 Dec 2017. Do note that I was running django with no issues before these issues came to fruition.


回答1:


To upgrade pip, I typed into command prompt curl https://bootstrap.pypa.io/get-pip.py | python3.

To be able to run the django website on my machine, I had to use python3 manage.py runserver. The trick here was to use python3 instead of python.



来源:https://stackoverflow.com/questions/51452243/upgrading-pip-installing-django-ssl-tlsv1-alert-protocol-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!