为了账号安全,请及时绑定邮箱和手机立即绑定

使用pip3安装软件包时,“ Python中的SSL模块不可用”

使用pip3安装软件包时,“ Python中的SSL模块不可用”

陪伴而非守候 2019-10-16 14:14:30
我已经在本地计算机上成功安装了Python 3.4和Python 3.6,但是无法使用安装软件包pip3。执行时pip3 install <package>,出现以下与SSL相关的错误:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Collecting <package>  Could not fetch URL https://pypi.python.org/simple/<package>/: 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 <package> (from versions: )No matching distribution found for <package>如何修复Python3.x安装,以便可以使用安装软件包pip install <package>?
查看完整描述

3 回答

?
HUWWW

TA贡献1874条经验 获得超12个赞

我遇到了与主题描述相同的问题。

环境:MacOS Sierra。我用自制的。

我的解决方案:

  1. 通过brew uninstall openssl, brew install openssl; 重新安装openssl ;

  2. 根据Homebrew提供的提示,执行以下操作:

    echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

    export LDFLAGS="-L/usr/local/opt/openssl/lib"

    export CPPFLAGS="-I/usr/local/opt/openssl/include"


查看完整回答
反对 回复 2019-10-16
  • 3 回答
  • 0 关注
  • 1732 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信