编辑:在注释中建议的答案或我找到的其他答案是主要用于linux或使用brew安装的默认python。我面临的问题是使用pyenv安装的python版本
当我尝试使用pip安装任何软件包时,出现此错误消息
WARNING: pip is configured with locations that require TLS/SSL, however the SSL module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the SSL certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with URL: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
我正在使用pyenv,pyenv-virtualenv,并且尝试使用python 3.7.0在virtualenv中安装软件包。几天前一切正常,我怀疑将macOS更新到10.14.6导致了此问题。
在谷歌搜索或在StackOverflow上找不到任何有效的解决方案。有人可以帮我解决问题
最佳答案
上面的答案对我不起作用,任何使用pip命令都会给我同样的错误。
我终于通过使用pyenv重新安装python3来解决了这个问题,如下所示:
pyenv install 3.7.0
# pyenv: /Users/devbhadurkhadka/.pyenv/versions/3.7.0 already exists
# continue with installation? (y/N) y
谢谢大家的回答
关于python - pip在Mac中给出错误 "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59267373/