栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【树莓派】报错 pip is configured with locations that require TLS/SSL(2021年12月31日已解决)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【树莓派】报错 pip is configured with locations that require TLS/SSL(2021年12月31日已解决)

报错信息
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.python.org/simple/opencv-python/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
系统

树莓派 3b
安装完系统后树莓派自带的是 python3.9
但是由于开发需要安装 python3.6

下载了 python3.6.8 源代码后编译安装
运行

curl https://bootstrap.pypa.io/get-pip.py | python

发生了前面提到的报错,是 openssl 的问题,使用命令查看了一下,系统中是有 openssl 的,而且也是最新版本,所以问题应该还是 python3.6 的安装引起的。
所以网上提到的重装 openssl 是无效的

解决方案
  1. 第一步安装需要的依赖文件
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
  1. 第二步重新到 python3.6.8 的源代码文件夹内,编译安装 python3.6.8

然后问题就解决了!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/689000.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号