2

I am trying to install quandl to use in Jupyter notebook. py -m pip install quandl

But I get the following error that SSL module in Python is not available.

Collecting quandl
  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/quandl/
  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/quandl/
  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/quandl/
  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/quandl/
  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/quandl/
  Could not fetch URL https://pypi.org/simple/quandl/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/quandl/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  ERROR: Could not find a version that satisfies the requirement quandl (from versions: none)
ERROR: No matching distribution found for quandl
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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```

*******************************************************************************************************
I tried using the following, but nothing worked

```py -m pip install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --user quandl```

Ishan
  • 21
  • 1
  • 2
  • Has anyone got a viable answer for this issue? I am experiencing the same issue with both an OSGeo4W64 installation and a QGIS 3.10 ltr installation. I have plugins that require third party packages and I am unable to install them. – CNIDog Feb 18 '20 at 21:32
  • reference: https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3 – water May 29 '20 at 03:43

2 Answers2

0

If you are using Anaconda, then add the following in environment paths:-

D:\Anaconda3; 
D:\Anaconda3\Scripts; 
D:\Anaconda3\Library\bin;
Rohit Patil
  • 103
  • 1
  • 7
  • I have seen this posted elsewhere. I added this in "System Environment Variables" under "PATH". But it is not working. Is that the correct way? Or are you saying add to Conda/Anaconda? – Steve Gon Feb 01 '20 at 19:27
  • 1
    You need to restart the terminal/command prompt after you edit the environment path. – Rohit Patil Feb 02 '20 at 08:43
  • Thanks Rohit. I did that. Still getting the same error: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. – Steve Gon Feb 03 '20 at 17:03
  • 1
    Sadly, this is not an answer if Anaconda is not part of the installation. What if it was installed as part of QGIS? Or OSGeo4W64? I have no issues at all with a standard Python 3.7 installation, but cannot pip install anything in the QGIS interpreter due to this error. Adding the interpreter paths (ex: `C:\Program Files\QGIS 3.10\apps\Python37\Scripts`) did nothing to fix the problem. – CNIDog Feb 18 '20 at 21:15
0

Try reinstalling python in the directory where you intend to install pip.

Then install pip and you should be good to go.

Keshav Sharma
  • 124
  • 1
  • 7