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

后端 未结 28 1483
别跟我提以往
别跟我提以往 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

    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
    

提交回复
热议问题