我在OSX 10.13的虚拟环境中运行pip install
遇到了麻烦。我已经运行了brew install openssl
并且路径/usr/local/include/openssl
指向../opt/openssl/include/openssl
。是否有人知道如何解决这个问题?这是在我使用brew install
重新安装python
后发生的。
pip被配置为需要TLS/SSL的位置,但Python中的ssl模块不可用。正在收集Pillow 无法获取URLhttps://pypi.python.org/simple/pillow/:因为SSL模块不可用,无法连接到HTTPS URL - 跳过 找不到满足要求的Pillow版本(来自版本:)找不到匹配的分发。
更新:下面是更多信息:
✗ 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
是 keg-only 的,因此/usr/local/include/openssl
不应该存在,运行brew unlink openssl
。 - ivan_pozdeevbrew unlink
。 - John M.