0

I am trying to install django to my python 3.6 virtual enviroment using pip env

sudo pipenv install --python 3.6 django==2.2 and I get an this error

⠧ Installing django...Error:  An error occurred while installing django==2.2!
Error text: 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("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

WARNING: The directory '/Users/jayshah/Library/Caches/pipenv' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/django/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/django/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/django/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/django/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/django/
ERROR: Could not find a version that satisfies the requirement django==2.2 (from -r /tmp/pipenv-wesMhq-requirements/pipenv-eAbxsF-requirement.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for django==2.2 (from -r /tmp/pipenv-wesMhq-requirements/pipenv-eAbxsF-requirement.txt (line 1))

any idea what I can do?

jayboiq
  • 9
  • 1
  • your python/pip isn't compiled with the ssl module. to test this out, try ```python3.6 -c 'import ssl'``` – ewokx Aug 05 '20 at 02:16
  • @ewong u are right. it isnt compiled. any suggestions on what i could do? – jayboiq Aug 05 '20 at 02:18
  • how did you install python3.6? the absolute 'worst' case would be to grab the python source and compile it yourself (if possible) – ewokx Aug 05 '20 at 02:19
  • i used brew install python to install 3.6 @ewong – jayboiq Aug 05 '20 at 02:23
  • Esp. this answer: https://stackoverflow.com/a/50508580/7976758 – phd Aug 05 '20 at 08:25
  • https://stackoverflow.com/search?q=%5Bpip%5D+is+configured+with+locations+that+require+TLS%2FSSL%2C+however+the+ssl+module+in+Python+is+not+available – phd Aug 05 '20 at 08:25

0 Answers0