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

前端 未结 30 3032
遇见更好的自我
遇见更好的自我 2020-11-22 11:09

I am using Python3.6, when I try to install \"modules\" using pip3, I am facing the below mentioned issue \"pip is configured with locations that require TLS/SS

相关标签:
30条回答
  • 2020-11-22 11:49

    Encountered this issue while installing python 3.8 from source on ubuntu. The steps needed to install it successfully alongside the default python 3.7 are summarised below :

    sudo apt -y install libssl-dev zlib1g-dev build-essential
    
    wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
    tar -xf Python-3.8.0.tgz
    cd Python-3.8.0/
    
    ./configure --enable-optimizations
    make
    sudo make altinstall
    

    The install instruction for zlib1g-dev and build-essential is redundant, as ubuntu desktop already has these, but was necessary for some of Amazon's EC2 instances. python 3.8.0 is the current release just now, but should be replaced with the latest available.

    These instructions are best for keeping python 3.7 as the default for python3, and running python 3.8 in a virtual environment.

    0 讨论(0)
  • 2020-11-22 11:50

    For centos 7:

    Install openssl:

    sudo yum install openssl-devel
    

    now goto python directory were we extracted the python tar,

    run below commands

    sudo ./configure
    sudo make
    sudo make install
    

    This will fix the problem in centos...

    0 讨论(0)
  • 2020-11-22 11:50

    I ran into this problem! I accidentally installed the 32-bit version of Miniconda3. Make sure you choose the 64 bit version!

    0 讨论(0)
  • 2020-11-22 11:50

    You could try brew link and it will show you the proper instruction:

    $ brew link openssl --force
    Warning: Refusing to link macOS provided/shadowed software: openssl@1.1
    If you need to have openssl@1.1 first in your PATH run:
      echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc
    
    For compilers to find openssl@1.1 you may need to set:
      export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
      export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
    
    For pkg-config to find openssl@1.1 you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
    
    0 讨论(0)
  • 2020-11-22 11:51

    Currently there is same issue in Anaconda prompt (Anaconda3) on Windows 10. Here is workaround: https://github.com/ContinuumIO/anaconda-issues/issues/10576

    0 讨论(0)
  • 2020-11-22 11:54

    Newest Python 3.8.4 or higher should able to support https protocol out of box. If you still have old python installation on your pc - either download & install python3 manually, or using Chocolatey:

    If you don't have Chocolatey, install it - from here: https://chocolatey.org/docs/installation

    You can just copy paste one command line liner and execute it from command prompt with elevated priviledges.

    choco install python3
    

    if you don't have python3 installed, or you you have it installed - then:

    choco upgrade python3
    

    Notice also that you can use also anaconda distribution, as it has built-in python with https support, but this rather ancient instructions, no need to follow them anymore.

    Install anaconda, using command line:

    choco install anaconda3
    

    Set environment variables:

    set PATH=C:\tools\Anaconda3\Scripts;C:\tools\Anaconda3;C:\tools\Anaconda3\Library\bin;%PATH%
    

    and then run command which failed. In my case it was:

    pip install conan
    

    Anaconda uses separate python installation, and pip is also anaconda specific.

    0 讨论(0)
提交回复
热议问题