【发布时间】:2020-02-05 09:27:56
【问题描述】:
我在 OSX 10.13 的 virtualenv 中运行 pip install 时遇到问题。我已经运行brew install openssl 并且路径/usr/local/include/openssl 指向../opt/openssl/include/openssl。有谁知道如何解决这一问题?这在我使用brew install 重新安装python 后开始发生。
pip 配置了需要 TLS/SSL 的位置,但是 ssl Python 中的模块不可用。收集枕头无法取出 网址https://pypi.python.org/simple/pillow/:有问题 确认 ssl 证书:无法连接到 HTTPS URL,因为 SSL 模块不可用。 - 跳过找不到版本 满足要求枕头(来自版本:)无匹配 找到枕头的分布
更新:这里有更多信息:
✗ which python
/usr/local/opt/python/libexec/bin/python
✗ which pip
/usr/local/opt/python/libexec/bin/pip
✗ python --version
Python 3.7.4
✗ pip --version
pip 19.1.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
✗ brew info python
python: stable 3.7.4 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python/3.6.5_1 (4,795 files, 100.0MB)
Poured from bottle on 2019-10-08 at 14:39:37
/usr/local/Cellar/python/3.7.4_1 (3,903 files, 60.6MB) *
Poured from bottle on 2019-10-08 at 14:37:10
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb
是的,我同时安装了 3.6.5_1 和 3.7.4_1,因为有时我可能需要在两者之间切换。
✗ brew unlink openssl
Unlinking /usr/local/Cellar/openssl/1.0.2s... 0 symlinks removed
【问题讨论】:
-
首先显示
which python、which pip、python --version、pip --version的输出。然后,上次我检查时,openssl仅是小桶,所以/usr/local/include/openssl不应该出现,运行brew unlink openssl。 -
@ivan_pozdeev 当然,我已经添加了输出。我已经尝试过
brew unlink。