“ssl module in Python is not available” when installing package with pip3

后端 未结 28 1729
别跟我提以往
别跟我提以往 2020-11-22 08:51

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

28条回答
  •  执念已碎
    2020-11-22 09:04

    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.

提交回复
热议问题