231

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>?

4
  • 6
    Did you explicitly install pip3 on your ubuntu with the command sudo apt-get install python3-pip ??
    – Sidahmed
    Commented Dec 26, 2016 at 8:29
  • 3
    Please try pip3 install --upgrade pip and see whether you get the same message or not.
    – Herry
    Commented Jul 31, 2017 at 13:59
  • @Herry can't run that command due to the previous error
    – Mike Q
    Commented Mar 30, 2022 at 19:21
  • I solved this with anaconda: conda install -c anaconda openssl Commented Aug 12, 2022 at 17:46

34 Answers 34

172

Step by step guide to install Python 3.6 and pip3 in Ubuntu

  1. Install the necessary packages for Python and ssl: $ sudo apt-get install build-essential libffi-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

  2. Download and unzip "Python-3.6.8.tar.xz" from https://www.python.org/ftp/python/ into your home directory.

  3. Open terminal in that directory and run: $ ./configure

  4. Build and install: $ make && sudo make install

  5. Install packages with: $ pip3 install package_name

Disclaimer: The above commands are not tested in Ubuntu 20.04 LTS.

22
  • 4
    Worked on "Raspbian GNU/Linux 9 (stretch)"
    – Oktay
    Commented Oct 12, 2017 at 7:33
  • 2
    Thank you! I was going around in circles getting python3 working on Ubuntu 14.04 until I found this command list. Commented Feb 25, 2018 at 15:57
  • 2
    My Ubuntu saviour.
    – markroxor
    Commented Jul 3, 2018 at 14:28
  • 7
    This worked for me. Many thanks. One thing I couldn't wrap my head around though, why not start with step 4 and only "make; make install" once? Commented Jul 3, 2018 at 16:13
  • 4
    This will break down your system in Ubuntu > 20.04 cause "sudo make install" will try to overwrite default python version which is 3.8 in Ubuntu 20.04. Try "sudo make altinstall" instead
    – aafirvida
    Commented Sep 11, 2020 at 18:17
118

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.

17
  • 2
    I just installed it. In the list of the programs installed on my system I have three versions of OpenSSL (two 64 bit versions and one 32 bit version, although I am on a 64 bit system). I am not aware having installed all of them, so I left them there.
    – juergi
    Commented Mar 4, 2019 at 7:53
  • 1
    This was the most straight forward solution I have found after much searching. Pip was not working due to OpenSSL error. Spyder also crashed at launch due to a "cannot import name 'HTTPSHandler' from 'urllib.request'" error. This was isolated to windows 10 python 3 for me. Commenting to hopefully help link the solution for people googling, most top results were old and complex solutions. Commented Sep 11, 2019 at 22:10
  • 31
    If you are on Windows and use Anaconda just use Anaconda Prompt instead of cmd to run "pip install". No additional DLL/SSL change will be required.
    – FatihAkici
    Commented Oct 28, 2019 at 16:33
  • 3
    @FatihAkici - Thanks a lot. It helped me. Commented Nov 22, 2019 at 7:13
  • 3
    I was about to break my computer, used pycharm on a lot of machines and OSs but on this new windows one i installed anaconda and it seems it broke pip. I was browsing for like 2 hours, thank you so much mate. <3
    – Benoit F
    Commented Feb 3, 2020 at 21:55
87

If you are on Red Hat/CentOS:

# To allow for building python ssl libs
yum install openssl-devel
# Download the source of *any* python version
cd /usr/src
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
tar xf Python-3.6.2.tar.xz 
cd Python-3.6.2

# Configure the build w/ your installed libraries
./configure

# Install into /usr/local/bin/python3.6, don't overwrite global python bin
make altinstall
8
  • worked for python 2.7 as well. just add make and make altinstall
    – Jabda
    Commented Jul 3, 2018 at 17:42
  • 2
    If you need virtualenv, you have to run sudo /usr/local/bin/pip3.7 install virtualenv. Thank you for this answer!
    – technocrat
    Commented May 30, 2019 at 23:44
  • 2
    excellent, I was having trouble installing python 2.7.13 for a legacy docker image and needed openssl-devel to run python2.7 get-pip.py
    – Felipe
    Commented Jun 15, 2020 at 19:39
  • installed openssl-devel, ran again configure and make, make install. Worked just great!
    – Alfabravo
    Commented Nov 3, 2021 at 20:28
  • install openssl-devel and then reconfigure/rebuild/reinstall python fixed the problem for me.
    – konchy
    Commented Feb 25, 2022 at 9:45
52

I had a similar problem on OSX 10.11 due to installing memcached which installed python 3.7 on top of 3.6.

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Spent hours on unlinking openssl, reinstalling, changing paths.. and nothing helped. Changing openssl version back from to older version did the trick:

brew switch openssl 1.0.2e

I did not see this suggestion anywhere in internet. Hope it serves someone.

8
  • 3
    I had the same issue with MacOS Catalina 10.5.4 (Beta), now it works. Thank you! Commented Mar 19, 2020 at 11:37
  • 16
    For me it was brew switch openssl 1.0.2s. But that was it. You've saved me, thanks!
    – antonio
    Commented Apr 19, 2020 at 8:57
  • 3
    Trying this but it keeps telling me openssl does not have a version "1.0.2e" in the Cellar. openssl does not have a version "1.0.2s" in the Cellar. Commented Apr 23, 2020 at 14:41
  • 4
    Thank you so much! For me, your solution of switching to an older version of openssl worked: brew switch openssl 1.0.2t I'm on Mac OS Catalina 10.15.3. Hope it helps. Commented Jun 8, 2020 at 20:27
  • 1
    On OSX High Sierra, brew switch openssl 1.0.2o_2 works for me
    – anh_ng8
    Commented Jul 13, 2020 at 20:51
42

In Ubuntu, this can help:

cd Python-3.6.2
./configure --with-ssl
make
sudo make install
7
  • 7
    Why do we actually have to build python from source for this? is there not a solution that works with standard python distributions? I would kind of naively hope adding this module would be possible without overriding the python binary, which we don't always easily know the corresponding source location for, on a live system not freshly installed.
    – matanox
    Commented Feb 16, 2019 at 11:13
  • 1
    Tried this, didn't change anything
    – usernumber
    Commented Feb 28, 2019 at 17:31
  • 26
    I get a warning saying this option is not recognized
    – ma3oun
    Commented Mar 19, 2019 at 9:26
  • 1
    Thanks a lot this helped.
    – Kirill
    Commented Oct 26, 2021 at 15:19
  • 10
    According to ./configure --help for Python 3.9.1, the option is now called --with-openssl, and it should point to a directory. In Ubuntu, adding --with-openssl=$LD_LIBRARY_PATH will do Commented Feb 7, 2022 at 11:34
34

Agree with the answer by mastaBlasta. Worked for me. I encountered the same problem as the topic description.

Environment: MacOS Sierra. And I use Homebrew.

My solution:

  1. Reinstall openssl by brew uninstall openssl; brew install openssl
  2. According to the hints given by Homebrew, do the following:

    echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
    export LDFLAGS="-L/usr/local/opt/openssl/lib"
    export CPPFLAGS="-I/usr/local/opt/openssl/include"
    
2
  • 3
    Thanks, the trick is brew uninstall openssl, brew install openssl. I tried brew reinstall openssl which had no effect. But the uninstall/install works!
    – Jeff Tian
    Commented Jan 9, 2019 at 5:57
  • 9
    had to run brew uninstall --ignore-dependencies openssl Commented Mar 12, 2020 at 16:06
24

I had the same issue with python3.8.5 installation on Debian9. I have done a build, but when I have tried to download some modules, pip3.8 issued following error:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

I have searched for the root of my problem and found out that there is a system dependent portion of the python build which is called by system independent one. In case of missing ssl you just needed to open python terminal and check whether is _ssl present:

>>> help('modules')
.
.
_sre                enum                pwd                 wave
_ssl                errno               py_compile          weakref
_stat               faulthandler        pyclbr              webbrowser
.
.

If not your system dependent ssl module part is missing. You can check it also by listing content of <python_installation_root>/lib/python3.8/lib-dynload:

>ls ./lib/python3.8/lib-dynload | grep ssl
_ssl.cpython-38-x86_64-linux-gnu.so

The problem was caused as written by PengShaw by missing libssl-dev during the build. Therefore you have to follow the recommended python installation flow. First install prerequisites and then build and install the python. Installation without devel versions of libs resulted in my case in the missing system dependent part. In this case _ssl.

Note that the devel lib name differs for Debian and CentOS, therefore check whether the installation hints posted on net are suitable for your specific Linux system type:

For Debian:
sudo apt install -y libbz2-dev libffi-dev libssl-dev
./configure --enable-optimizations
make
make altinstall


For CentOS:
sudo yum -y install bzip2-devel libffi-devel openssl-devel
./configure --enable-optimizations
make
make altinstall

It is for sure a good idea to list configuration options prior the configuration and evtl. use some additional options:

./configure --help

Last but not least in case you use --prefix for a non-default installation location, remember to add your <python_installation_root>/lib to your LD_LIBRARY_PATH .

3
  • 3
    Excellent. Helping us understand how to debug the problem, understand the source and fix it properly. Commented Jan 11, 2021 at 14:10
  • Good explanation for why I still get the error even though I have installed ssl module after installing Python 3.9.
    – F.G
    Commented Aug 6, 2022 at 8:00
  • On CentOS I needed to further sym-link openssl11 in /usr/local/openssl11 to match what python installer was looking for, as explained here: stackoverflow.com/a/74293084/536538 Commented Nov 2, 2022 at 17:06
12

If you are on Windows and use Anaconda you can try running "pip install ..." command in Anaconda Prompt instead of cmd.exe, as user willliu1995 suggests here. This was the fastest solution for me, that does not require installation of additional components.

10

The problem probably caused by library missing.

Before you install python 3.6, make sure you install all the libraries required for python.

$ sudo apt-get install build-essential checkinstall 
$ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

More information in How to Install Python 3.6.0 on Ubuntu & LinuxMint

1
  • It shoud be warned by ./configure, doesn't it ? Commented May 6 at 19:44
9

Downgrading openssl worked for me,

brew switch openssl 1.0.2s
0
8

If you are on OSX and have compiled python from source:

Install openssl using brew brew install openssl

Make sure to follow the instructions brew gives you about setting your CPPFLAGS and LDFLAGS. In my case I am using the [email protected] brew formula and I need these 3 settings for the python build process to correctly link to my SSL library:

export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"

Assuming the library is installed at that location.

3
  • still the same issue Commented Jul 20, 2018 at 8:46
  • Try reinstalling pip Commented Jul 24, 2018 at 18:00
  • @GauravPaliwal, @mastaBlasta: For me, switching to an older version of openssl worked: brew switch openssl 1.0.2t I'm on Mac OS Catalina 10.15.3. Hope it helps. Commented Jun 8, 2020 at 20:30
7

I tried A LOT of ways to solve this problem and none solved. I'm currently on Windows 10.

The only thing that worked was:

  • Uninstall Anaconda
  • Uninstall Python (i was using version 3.7.3)
  • Install Python again (remember to check the option to automatically add to PATH)

Then I've downloaded all the libs I needed using PIP... and worked!

Don't know why, or if the problem was somehow related to Anaconda.

7

for osx brew users

my issue appeared related to my python installation and was quickly resolved by re-installing python3 and pip. i think it started misbehaving after an OS update but who knows (at this time I am on Mac OS 10.14.6)

brew reinstall python3 --force
# setup pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
# installa pkg successfully 
pip install pandas
1
  • 1
    Thankyou for this answer! In my case, the problems started after updating to Catalina (10.15.3), and I found that your first step brew reinstall python3 --force was sufficient: pip worked again after that, I didn’t need to reinstall pip.
    – PLL
    Commented Apr 15, 2020 at 12:01
6

I encountered the same problem on windows 10. My very specific issue is due to my installation of Anaconda. I installed Anaconda and under the path Path/to/Anaconda3/, there comes the python.exe. Thus, I didn't install python at all because Anaconda includes python. When using pip to install packages, I found the same error report, pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available..

The solution was the following:

1) you can download python again on the official website;

2) Navigate to the directory where "Python 3.7 (64-bit).lnk"is located

3) import ssl and exit()

4) type in cmd, "Python 3.7 (64-bit).lnk" -m pip install tensorflow for instance.

Here, you're all set.

2
  • Not a fix, but definitely gets the job done. At least helps you install missing deps. What I realized on my local machine, is that I had conflicting entries in my PATH variable for python (ie. Anaconda 2.7 64-bit and Python 3.7 32-bit)
    – AP.
    Commented Apr 4, 2019 at 22:42
  • Also to improve upon this answer, you could store the absolute path in a variable and run it as: cmd /c $py .\main.py (Powershell) or cmd /c %py% .\main.py (Dos). This will run it in your existing shell and can be scripted
    – AP.
    Commented Apr 4, 2019 at 22:51
6

You can do either of these two:

  1. While installing Anaconda, select the option to add Anaconda to the path.

or

  1. Find these (complete) paths from your installation folder of Anaconda and add them to the environment variable :

\Anaconda

\Anaconda\Library\mingw-w64\bin

\Anaconda\Library\usr\bin

\Anaconda\Library\bin

\Anaconda\Scripts

\anaconda\Library

\anaconda\condabin

Add the above paths to the "Path" system variable and it should show the error no more :)

1
  • 2
    One alternative is to use the specific 'anaconda prompt' which has these environment variables set up correctly.
    – Tuula
    Commented Jul 16, 2020 at 10:31
5

The ssl module is a TLS/SSL wrapper for accessing Operation Sytem (OS) socket (Lib/ssl.py). So when ssl module is not available, chances are that you either don't have OS OpenSSL libraries installed, or those libraries were not found when you install Python. Let assume it is a later case (aka: you already have OpenSSL installed, but they are not correctly linked when installing Python).

I will also assume you are installing from source. If you are installing from binary (ie: Window .exe file), or package (Mac .dmg, or Ubuntu apt), there is not much you can do with the installing process.

During the step of configuring your python installation, you need to specify where the OS OpenSSL will be used for linking:

# python 3.8 beta
./configure --with-openssl="your_OpenSSL root"

So where will you find your installed OpenSSL directory?

# ubuntu 
locate ssl.h | grep '/openssl/ssl.h'

/home/user/.linuxbrew/Cellar/openssl/1.0.2r/include/openssl/ssl.h
/home/user/envs/py37/include/openssl/ssl.h
/home/user/miniconda3/envs/py38b3/include/openssl/ssl.h
/home/user/miniconda3/include/openssl/ssl.h
/home/user/miniconda3/pkgs/openssl-1.0.2s-h7b6447c_0/include/openssl/ssl.h
/home/user/miniconda3/pkgs/openssl-1.1.1b-h7b6447c_1/include/openssl/ssl.h
/home/user/miniconda3/pkgs/openssl-1.1.1c-h7b6447c_1/include/openssl/ssl.h
/usr/include/openssl/ssl.h

Your system may be different than mine, but as you see here I have many different installed openssl libraries. As the time of this writing, python 3.8 expects openssl 1.0.2 or 1.1:

Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().

So you would need to verify which of those installed libraries that you can use for linking, for example

/usr/bin/openssl version

OpenSSL 1.0.2g  1 Mar 2016
./configure --with-openssl="/usr"
make && make install

You may need to try a few, or install a new, to find the library that would work for your Python and your OS.

4

In the case of using pyenv to manage python installations on Mac OS Catalina, I had to install openssl with brew first and then after that run pyenv install 3.7.8 which seemed to build the python installation using the openssl from homebrew (it even said as such in the installation output). Then pyenv global 3.7.8 and I was away.

2

I was having the same issue and was able to resolve with the following steps:

sudo yum install -y libffi-devel
sudo yum install openssl-devel
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
sudo tar xf Python-3.7.1.tar.xz
cd Python-3.7.1
sudo ./configure --enable-optimizations
# Install into /usr/local/bin/python3.7, don't overwrite global python bin
sudo make altinstall

depending on perms, you may not need sudo.

Results:
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1

should now be able to run

python3.7 -V 

and

pip3.7 -V

When installing packages:

pip3.7 install pandas

or depending on perms, you can also add the --user flag like so:

pip3.7 install pandas --user
2

In my case with using Mac, I deleted /Applications/Python 3.7. because I already had Python3.7 by brew install python3 .

But it was a trigger of the message

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

What I did in my situation

  1. I downloaded macOS 64-bit installer again, and installed.
  2. Double click /Applications/Python3.6/Install Certificates.command and /Applications/Python3.6/Update Shell Profile.command.
  3. Reboot mac
  4. And I am not sure but possibly contributed to succeed is pip.conf. See pip install fails.
2

I finally solve this issue. These are the detail of my env:
Version of Python to install: 3.6.8
OS: Ubuntu 16.04.6 LTS
Root access: No

Some people suggest to install libssl-dev, but it did not work for me. I follow this link and I fixed it!
In short, I download, extract, build, and install OpenSSL (openssl-1.1.1b.tar.gz). Then, I modify .bashrc file follow this link.
Next, I download and extract Python-3.6.8.tgz. I edit Modules/Setup.dist to modify SSL path (lines around #211). I did ./configure --prefix=$HOME/opt/python-3.6.8, make and make install. Last, I modify my .bashrc. Notice that I do not include --enable-optimizations in ./configure.

2

I was able to fix this by updating the python version in this file. pyenv: version `3.6.5' is not installed (set by /Users/taruntarun/.python-version) Though i had the latest version installed, my command was still using old version 3.6.5

Moving to version 3.7.3

2

Termux

This worked because i didnt have an existing openssl version installed.

pkg install openssl-tool
1

If you are on OSX and in case the other solutions didn't work for you (just like me).

You can try uninstalling python3 and upgrade pip3

brew uninstall --ignore-dependencies python3
pip3 install --upgrade pip   

This worked for me ;)

1

(NOT on Windows!)

This made me tear my hair out for a week, so I hope this will help someone

I tried everything short of re-installing Anaconda and/or Jupyter.

Setup

  • AWS Linux
  • Manually installed Anaconda 3-5.3.0
  • Python3 (3.7) was running inside anaconda (ie, ./anaconda3/bin/python)
  • there was also /usr/bin/python and /usr/bin/python3 (but these were not being used as most of the work was done in Jupyter's terminal)

Fix

In Jupyter's terminal:

cp /usr/lib64/libssl.so.10 ./anaconda3/lib/libssl.so.1.0.0

cp /usr/lib64/libcrypto.so.10 ./anaconda3/lib/libcrypto.so.1.0.0

What triggered this?

So, this was all working until I tried to do a conda install conda-forge

I'm not sure what happened, but conda must have updated openssl on the box (I'm guessing) so after this, everything broke.

Basically, unknown to me, conda had updated openssl, but somehow deleted the old libraries and replaced it with libssl.so.1.1 and libcrypto.so.1.1.

Python3, I guess, was compiled to look for libssl.so.1.0.0

In the end, the key to diagnosis was this:

python -c "import ssl; print (ssl.OPENSSL_VERSION)"

gave the clue library "libssl.so.1.0.0" not found

The huge assumption I made is that the yum version of ssl is the same as the conda version, so just renaming the shared object might work, and it did.

My other solution was to re-compile python, re-install anaconda, etc, but in the end I'm glad I didn't need to.

Hope this helps you guys out.

1

When installing Python 3.11 on AWS Linux, you need to:

sudo yum remove openssl-devel
sudo yum install openssl11-1.1.1g openssl11-libs-1.1.1g openssl11-devel-1.1.1g

You can then just run:

./configure --enable-optimizations
sudo make altinstall

Answer from https://github.com/actions/setup-python/issues/93 and verified working as of January 2024

0

On macos, configure python 3.8.1 with the command below will solve the problem, i think it would also work on Linux.

./configure --enable-optimizations --with-openssl=/usr/local/opt/[email protected]/

change the dir parameter based on your system.

0

I've made some PATH changes to mimic part of the Anaconda Powershell Prompt $env:PATH

C:\Users\merheb\Miniconda3;C:\Users\merheb\Miniconda3\Library\mingw-w64\bin;C:\Users\merheb\Miniconda3\Library\usr\bin;C:\Users\merheb\Miniconda3\Library\bin;C:\Users\merheb\Miniconda3\Scripts;C:\Users\merheb\Miniconda3\bin;C:\Users\merheb\Miniconda3\condabin;

enter image description here

And It worked for me.

0

Building from source was what worked for me on Ubuntu 22.10:

Install OpenSSL manually, tested here with OpenSSL 1.1.1s, extracted then ran:

./config --prefix='/opt/openssl' --openssldir='/opt/ssl'
make
make install

Then with your older Python 3 version (here Python-3.8.16) run:

export LD_RUN_PATH='/opt/openssl/lib'
export CC='gcc-12'  # sudo apt install gcc-12
./configure --enable-optimizations \
            --with-openssl='/opt/openssl' \
            --prefix='/opt/python/3.8' -C
make
make install

Test with:

/opt/python/3.8/bin/python3 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.1.1s  1 Nov 2022
0

I have this issue with centos 7 and python 3.6. None of the answers solves it and I finally figured out how to fix it.

First, install openssl from source code by following this link:

install openssl

After that, ssl header file "openssl/ssl.h" is in path:

/usr/local/openssl/include

ssl lib file is in path;

/usr/local/openssl/lib

Now compile python from source code. Before compile it, go to setup.py, locate function detect_modules(), search for 'ssl'.

Add ssl include file path to the following code:

        search_for_ssl_incs_in = [
                              '/usr/local/openssl/include'
                             ]

For lib file, there is trick here.

the code is searching for ssl lib file firstly from some standard system paths:

lib_dirs: ['/usr/local/lib', '/lib64', '/usr/lib64', '/lib', '/usr/lib']

If any of these folder contains ssl lib file, then it will return an empty path so the compile will skip ssl. I don't know the logic here but I just removed ssl lib file from these paths. In my host, there is libssl.a in /lib, so move it to an subfolder.

Then assign ssl lib path in setup.py:

        ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
                                     [
                                      '/usr/local/openssl/lib'
                                     ] )

Compile python:

./configure
make
make install
-1

I was having the same problem for the last two days and only have fixed it right now.

I had tried to use --trust-host option with the DigiCert_High_Assurance_EV_Root_CA.pem did not work, I couldn't install the ssl module (It tells it cannot be installed for python versions greater than 2.6), setting the $PIP_CERT variable didn't fix it either and I had libssl1.0.2 and libssl1.0.0 installed. Also worth mentioning I didn't had a ~/.pip/pip.conf file, and creating it didn't solve the bug either.

What finally solved it, was installing python3.6 with make again. Download the Python-3.6.0.tgz from the website, run configure then make, make test and make install. Hope it works for you.

1
  • 4
    Sorry but had to downvote due to this simply stating to repeatthe same steps that caused this error. I don't know how you would expect to run the same commands on the same python source and get different results! Commented Dec 8, 2018 at 21:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.