In a virtual environment activated in a virtual machine, I can't install any package with pip, since it raises a SSL related error.
I'm setting up a virtual environment (with virtualenv) to mimic the the settings of a server that I'm going to work with. So I installed mannualy (from tar file) a specific version of python (3.7.0) in a Ubuntu 18.04 virtual machine (using VirtualBox). Once my python version of choice was running I activated a virtual environment. The pip version is 18.1.
The problem comes when I try to install a python package, like:
$ pip install django
It raised this error:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting django
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/
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
Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django
Neither of the answers that I found after searching helped me. Since pip can't install anything, it can't install packages like ssl nor OpenSSL. If anyone can help me, I thank a lot in advance.