编辑:评论区或者我找到的其他答案所提供的解决方法主要适用于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的虚拟环境中安装软件包。几天前还能正常工作,我怀疑是我更新了macOS到10.14.6导致了这个问题。
我在谷歌或StackOverflow上找不到任何解决方案。请有人帮忙解决这个问题。