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

好久不见. 提交于 2019-11-27 00:37:23

For Windows 10 if you want use pip in normal cmd, not only in Anaconda prompt. you need add 3 environment paths. like these: D:\Anaconda3; D:\Anaconda3\Scripts; D:\Anaconda3\Library\bin

most people only add D:\Anaconda3\Scripts;

For future Oracle Linux users trying to solve this, below is what worked for me. First install missing libs:

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel 
readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

Then cd to your Python3.X library and run:

make
make install 

For Debian users, the following may be of use:

sudo -s

apt install libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.5 libgdm-dev libdb4o-cil-dev libpcap-dev

Then cd to the folder with the Python 3.X library source code and run:

./configure
make
make install

For OpenSUSE in the same manner, but a few changes of listed above packages:

zypper install zlib-devel libopenssl-devel ncurses-devel sqlite3-devel readline-devel tk-devel gdbm-devel libpcap-devel xz-devel

Then cd to Python sources dir and

make
make install

or

make
make altinstall

And perhaps

ln -s /usr/local/lib64/python3.6/lib-dynload/ /usr/local/lib/python3.6/lib-dynload

should be executed for OpenSUSE users. See Python 3.7 install not working on openSUSE Leap 42.3

For Windows 10,windows 7 If pip install is not working on CMD prompt, run it using Anaconda prompt - it works.

https://github.com/pypa/virtualenv/issues/1139

As Tokci said, it also works for Windows 7.

"Go with the mouse to the Windows Icon (lower left) and start typing "Anaconda". There should show up some matching entries. Select "Anaconda Prompt". A new command window, named "Anaconda Prompt" will open."

Then pip works.

The following also helped to import xgboost: https://www.youtube.com/watch?v=05djBSOs1FA

Anny Gutierrez

If someone is using Arch Linux OS, I solved the TLS/SSL problem by running this:

sudo pacman -S openssl

Then I could use pip to install the package I needed:

pip install openpyxl

Go to Anaconda prompt and type (if you have python 3.x installed on your engine) :

py -m pip install pymysql 

i was having the same issue and this solved my problem. later after doing this you can import pymysql in power shell or any other prompt.

Just try installing through Anaconda prompt

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

Use anaconda navigator to launch jupyter in chrome.

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

This worked for me:

yum install python36-pyOpenSSL 

python version and package manager might differ.

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!