我试图将 pip 从 9.x 升级到 19.3.1。最初,此回溯仅在发出pip
. 现在它在尝试时发生pip list/install/uninstall
。我已经尝试了一些东西,包括这里的解决方案:
'pip install' 对每个包都失败(“找不到满足要求的版本”)
这里的 curl 命令也会生成相同的回溯。
我已经尝试过sudo easy_install -U pip
,这允许我在没有回溯的情况下运行 pip,但是在尝试列出/安装/卸载时我仍然有回溯。
这是回溯:
Traceback (most recent call last):
File "<stdin>", line 22318, in <module>
File "<stdin>", line 198, in main
File "<stdin>", line 83, in bootstrap
File "/var/folders/zz/n8qtr4fd7pq4c0wgpswz2xf40000gq/T/tmp4UTKAc/pip.zip/pip/_internal/commands/install.py", line 23, in <module>
File "/var/folders/zz/n8qtr4fd7pq4c0wgpswz2xf40000gq/T/tmp4UTKAc/pip.zip/pip/_internal/cli/req_command.py", line 20, in <module>
File "/var/folders/zz/n8qtr4fd7pq4c0wgpswz2xf40000gq/T/tmp4UTKAc/pip.zip/pip/_internal/network/session.py", line 17, in <module>
File "/var/folders/zz/n8qtr4fd7pq4c0wgpswz2xf40000gq/T/tmp4UTKAc/pip.zip/pip/_vendor/requests/__init__.py", line 97, in <module>
File "/var/folders/zz/n8qtr4fd7pq4c0wgpswz2xf40000gq/T/tmp4UTKAc/pip.zip/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
File "/Library/Python/2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/Library/Python/2.7/site-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import (
File "/Library/Python/2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/Library/Python/2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 182, in <module>
Binding.init_static_locks()
File "/Library/Python/2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 139, in init_static_locks
cls._ensure_ffi_initialized()
File "/Library/Python/2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 134, in _ensure_ffi_initialized
cls._register_osrandom_engine()
File "/Library/Python/2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 99, in _register_osrandom_engine
_openssl_assert(cls.lib, cls.lib.ERR_peek_error() == 0)
File "/Library/Python/2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 43, in _openssl_assert
errors
cryptography.exceptions.InternalError: Unknown OpenSSL error. Please file an issue at https://github.com/pyca/cryptography/issues with information on how to reproduce this.
macOS 版本:10.14.6
openssl 版本:LibreSSL 3.0.2(brew 安装并添加到 .zshrc 中的 PATH)
pip 版本:来自 /Library/Python/2.7/site-packages/pip-19.3.1-py2.7.egg/pip (python 2.7) 的 pip 19.3.1