首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")解决方法

Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")解决方法

作者头像
SweetHunter
发布2020-05-11 17:35:09
发布2020-05-11 17:35:09
14.2K0
举报
文章被收录于专栏:FinalBoyFinalBoy

前言

前段时间在 centos 上安装好 python3.7 后,通过 pip 安装模块时,出现以下错误:Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")

1.处理 openssl

代码语言:javascript
复制
yum install openssl
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/bin/openssl /usr/include/bin/openssl.bak
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/bin/openssl /usr/include/bin/openssl

2.重新安装编译 python

按照自己前面安装和编译 python 的步骤进行重装就解决了这个问题。下面只是我的安装步骤,仅供参考

代码语言:javascript
复制
./configure --prefix=/usr/local/python3
make
make install
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除
目录
  • 前言
  • 1.处理 openssl
  • 2.重新安装编译 python
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档