I've install Python 3.4 and Python 3.6 on my local machine successfully, but am unable to install packages with pip3
.
When I execute pip3 install <package>
, I get the following SSL related error:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting <package>
Could not fetch URL https://pypi.python.org/simple/<package>/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement <package> (from versions: )
No matching distribution found for <package>
How can I fix my Python3.x install so that I can install packages with pip install <package>
?
Step by step guide to install Python 3.6 and pip3 in Ubuntu
Install the necessary packages for Python and ssl: $ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Download and unzip "Python-3.6.8.tar.xz" from https://www.python.org/ftp/python/ into your home directory.
Open terminal in that directory and run: $ ./configure
Build and install: $ make && sudo make install
Install packages with: $ pip3 install package_name
Disclaimer: The above commands are not tested in Ubuntu 20.04 LTS.
If you are on Windows and use anaconda this worked for me:
I tried a lot of other solutions which did not work (Environment PATH Variable changes ...)
The problem can be caused by DLLs in the Windows\System32 folder (e.g. libcrypto-1_1-x64.dll or libssl-1_1-x64.dll or others) placed there by other software.
The fix was installing openSSL from https://slproweb.com/products/Win32OpenSSL.html which replaces the dlls by more recent versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With