Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
307 views
in Technique[技术] by (71.8m points)

python - pip cannot confirm SSL certificate: SSL module is not available

I am trying to install RPi.GPIO for Python 3.6 on my Raspberry Pi Zero W, but somehow it won't connect to the python.org website. I have pip installed for 2.7, 3.0, and 3.6 installed, so when I go and do something like:

sudo pip3.6 install RPi.GPIO

I get this error:

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 https://pypi.python.org/simple/rpi-gpio/: 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

I did try sudo apt-get install openssl and so on, but it still doesn't work. I can access the website perfectly on my desktop and phone, but my Raspberry Pi won't at all. Any idea what I can do?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Before installing python 3.6 you need to install the libraries needed.

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

Do you have these installed on the PI?

More details here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...