SSL module not available, unable to install packages

Hello everyone,

the problem I have seems to reoccur for several other users but the suggestions I read so far to solve it did not help me. When I want to install a package to my virtual environment an error occurs that states that the SSL module is not available. But when I run pip within the conda prompt everything works fine. OpenSSL is updated, as well as pip. What seems strang to me is that anaconda has the latest version of pip (19.1.1), while in the venv it says the version is 19.0.3. Im using Windows 10, Anaconda3, Python 3.7 and Pycharm2019.1.1.

 

 

Non-zero exit code (1)

Collecting PyQt5
Could not fetch URL https://pypi.org/simple/pyqt5/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyqt5/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

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/pyqt5/
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/pyqt5/
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/pyqt5/
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/pyqt5/
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/pyqt5/
ERROR: Could not find a version that satisfies the requirement PyQt5 (from versions: none)
ERROR: No matching distribution found for PyQt5
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

3 comments
Comment actions Permalink

Please see https://youtrack.jetbrains.com/issue/PY-35141 and check if conda is installed in non-default location.

Also see https://youtrack.jetbrains.com/issue/PY-34959 and related issues.

 

As the workaround, please try running PyCharm from the terminal using `<pycharm_installation>/bin/pycharm.bat` , and activate the proper conda environment beforehand in that terminal session.

1
Comment actions Permalink

Conda was installed in a default version. It might acutally be, that DLLs are not loaded correctly. But a lot of the solutions are using the command line and as I am quite new to programming I do not completely understand what they mean. The same is true for your last statement. How do I activate the proper conda environment in the terminal session? Can you elaborate, please?

0
Comment actions Permalink

Hi, try the following

- run cmd.exe, e.g. by clicking Start Windows button and typing cmd and then Enter

- activate base conda interpreter by running the following line in the command line, change the path to your Anaconda installation

C:\Users\jetbrains\Miniconda3\Scripts\activate.bat

- activate conda environment with the line below and change <conda_venv_name> to your conda virtual environment name

conda activate <conda_venv_name>

- run PyCharm with bat file (change the path to PyCharm installation on your machine)

"C:\Program Files\JetBrains\PyCharm 192.3675\bin\pycharm.bat"
0

Please sign in to leave a comment.