pip无法确认SSL证书:SSL模块不可用 [英] pip cannot confirm SSL certificate: SSL module is not available

查看:95
本文介绍了pip无法确认SSL证书:SSL模块不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我收到此错误:

pi @ raspberrypi:〜$ sudo pip3.6安装RPi.GPIO
pip配置了需要TLS/SSL的位置,但是Python中的ssl模块不可用.
收集RPi.GPIO
  无法获取URL >://://pipi.python.org/simple/rpi- gpio/:确认ssl证书时出现问题:无法连接到HTTPS URL,因为SSL模块不可用. -跳过
  找不到满足RPi.GPIO要求的版本(来自版本:)
找不到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 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

我确实尝试过sudo apt-get install openssl,依此类推,但仍然无法正常工作.我可以在台式机和手机上完美地访问该网站,但是我的Raspberry Pi根本无法访问.知道我能做什么吗?

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?

推荐答案

安装之前,需要安装所需的库.

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

您在PI上安装了这些工具吗?

Do you have these installed on the PI?

更多详细信息此处

这篇关于pip无法确认SSL证书:SSL模块不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆