python – pip无法确认SSL证书:SSL模块不可用

我正在尝试在我的Raspberry Pi Zero W上为Python 3.6安装RPi.GPIO,但不知何故它不会连接到python.org网站.我安装了2.7,3.0和3.6的pip,所以当我去做类似的事情:

sudo pip3.6 install RPi.GPIO

我收到此错误:

pi@raspberrypi:~ $sudo pip3.6 install RPi.GPIO
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting RPi.GPIO
  Could not fetch URL 07000: There was a problem confirming the ssl certificate: Can’t connect to HTTPS URL because the SSL module is not available. – skipping
  Could not find a version that satisfies the requirement RPi.GPIO (from versions: )
No matching distribution found for RPi.GPIO

我确实尝试过sudo apt-get install openssl等等,但它仍然无效.我可以在桌面和手机上完美访问网站,但我的Raspberry Pi根本不会.知道我能做什么吗?

在安装python 3.6之前,您需要安装所需的库.

sudo apt-get install build-essential checkinstall 
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

你在PI上安装了这些吗?

更多细节here

https://stackoverflow.com/questions/44290926/pip-cannot-confirm-ssl-certificate-ssl-module-is-not-available

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:python – pip无法确认SSL证书:SSL模块不可用