Dev*_*dka 8 python pip python-3.x pyenv pyenv-virtualenv
编辑:我发现的评论或其他答案中建议的答案主要适用于 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
Run Code Online (Sandbox Code Playgroud)
我正在使用 pyenv、pyenv-virtualenv,我正在尝试使用 python 3.7.0 在 virtualenv 中安装软件包。几天前它运行良好,我怀疑将我的 macOS 更新到 10.14.6 导致了这个问题。
在谷歌搜索或 StackOverflow 上我找不到任何可行的解决方案。有人可以帮我解决这个问题吗
Dev*_*dka 19
上面的答案对我不起作用,任何使用 pip 命令都会给我同样的错误。
我终于通过使用 pyenv 重新安装 python3 解决了这个问题,如下所示
pyenv install 3.7.0
# pyenv: /Users/devbhadurkhadka/.pyenv/versions/3.7.0 already exists
# continue with installation? (y/N) y
Run Code Online (Sandbox Code Playgroud)
谢谢大家的回答