Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL module in Python is not available - QGIS

Tags:

python

qgis

The following error seems to be quite common:

C:\Program Files\QGIS 3.10\apps\Python37>python -m pip install doesnotmatterwhatIputhere
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Most solutions I have seen assume Anaconda is somehow involved or some form of sudo, yum, brew, etc.

I am (this time) using a QGIS interpreter on Windows 10, so none of the above apply.

On the same computer, I have a standard installation of Python in C:\Python37 that works without fail. However, the same error also happened with an OSGeo4W64 install that I tried.

I have put C:\Program Files\QGIS 3.10\apps\Python37 (along with \Scripts and \Lib) in my PATH variable to no avail - which is the closest I can come to simulating the multiplicity of Anaconda "solutions". The same error still results.

I have seen a multiplicity of posts about this problem. Many of them have no answers at all and those that do seem to go the Anaconda route. What about us snake-hating QGIS users?

like image 227
CNIDog Avatar asked Sep 17 '25 07:09

CNIDog


1 Answers

The final solution that worked for me was found here: https://bugs.python.org/issue39344

Make sure the libcrypto-1_1-x64.dll and libssl-1_1-x64.dll files are in the same directory as your _ssl.pyd

These files can be found in the C:\Program Files\QGIS 3.x\bin folder and will need to be copied to the C:\Program Files\QGIS 3.x\apps\Python3x\DLLs folder.

like image 161
CNIDog Avatar answered Sep 19 '25 21:09

CNIDog