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

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

    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
    

提交回复
热议问题