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.
To upgrade pip, I typed into command prompt curl https://bootstrap.pypa.io/get-pip.py | python3
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.