Pip 在安装包时挂起
Pip hangs on installing packages
我在虚拟环境中使用 Django。我正在使用 powershell 并尝试安装 pyopenssl。
内部虚拟环境:
pip 版本 = 19.2.3
python版本=3.8.3
外部虚拟环境:
pip 版本 = 21.2.4
python版本=3.8.3
我尝试使用 python -m pip install -U pip
和 pip install --upgrade pip
在虚拟环境中升级 pip但是它在没有产生任何输出的情况下被挂起这里是 screenshot.
我试试pip install pyopenssl
:
(bookmarks) bookmarks> pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting six>=1.5.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ...
它挂在 Installing build dependencies ...
。我已经等了 30 分钟,但什么也没发生。
我也试过了python -m pip install pyopenssl
(bookmarks) bookmarks> python -m pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ... \
当我尝试 pip -v install pyopenssl
:
(由于输出量较大,只展示最后一部分。)
Added semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) to build tracker 'C:\Users\Suhail\AppData\Local\Temp\pip-req-tracker-86fcyvxc'
Removed semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) from build tracker 'C:\Users\Suhail\AppData\Local\Temp\pip-req-tracker-86fcyvxc'
Installing collected packages: setuptools, wheel, pycparser, cffi, toml, semantic-version, setuptools-rust
Creating C:\Users\Suhail\AppData\Local\Temp\pip-build-env-fwbrqqmx\overlay\Scripts
Successfully installed cffi-1.14.6 pycparser-2.20 semantic-version-2.8.5 setuptools-58.1.0 setuptools-rust-0.12.1 toml-0.10.2 wheel-0.37.0
Cleaning up...
Cleaned build tracker 'C:\Users\Suhail\AppData\Local\Temp\pip-req-tracker-86fcyvxc'
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
我又一次卡在这个输出上,没有安装 pyOpenSSL。
但是,pip install pyopenssl
在虚拟环境之外工作 screenshot
我卡在这个冻结状态了 2 天。
如果您知道解决方案,请回答。谢谢
这是对我有用的
第 1 步:首先我卸载了 pip:
pip uninstall pip
要确保 pip 已卸载,请键入 pip
并确保获得 ModuleNotFoundError: No module named 'pip'
第二步:下载PIP get-pip.py:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
第 3 步:安装 PIP:
python get-pip.py
确保 pip 已安装 运行 pip --version
确保它是最新的,截至目前 (21.2.4)。
我终于能够安装 pyopenssl :))
pip install pyopenssl
我在虚拟环境中使用 Django。我正在使用 powershell 并尝试安装 pyopenssl。
内部虚拟环境:
pip 版本 = 19.2.3
python版本=3.8.3
外部虚拟环境:
pip 版本 = 21.2.4
python版本=3.8.3
我尝试使用 python -m pip install -U pip
和 pip install --upgrade pip
在虚拟环境中升级 pip但是它在没有产生任何输出的情况下被挂起这里是 screenshot.
我试试pip install pyopenssl
:
(bookmarks) bookmarks> pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting six>=1.5.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ...
它挂在 Installing build dependencies ...
。我已经等了 30 分钟,但什么也没发生。
我也试过了python -m pip install pyopenssl
(bookmarks) bookmarks> python -m pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ... \
当我尝试 pip -v install pyopenssl
:
(由于输出量较大,只展示最后一部分。)
Added semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) to build tracker 'C:\Users\Suhail\AppData\Local\Temp\pip-req-tracker-86fcyvxc'
Removed semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) from build tracker 'C:\Users\Suhail\AppData\Local\Temp\pip-req-tracker-86fcyvxc'
Installing collected packages: setuptools, wheel, pycparser, cffi, toml, semantic-version, setuptools-rust
Creating C:\Users\Suhail\AppData\Local\Temp\pip-build-env-fwbrqqmx\overlay\Scripts
Successfully installed cffi-1.14.6 pycparser-2.20 semantic-version-2.8.5 setuptools-58.1.0 setuptools-rust-0.12.1 toml-0.10.2 wheel-0.37.0
Cleaning up...
Cleaned build tracker 'C:\Users\Suhail\AppData\Local\Temp\pip-req-tracker-86fcyvxc'
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
我又一次卡在这个输出上,没有安装 pyOpenSSL。
但是,pip install pyopenssl
在虚拟环境之外工作 screenshot
我卡在这个冻结状态了 2 天。 如果您知道解决方案,请回答。谢谢
这是对我有用的
第 1 步:首先我卸载了 pip:
pip uninstall pip
要确保 pip 已卸载,请键入 pip
并确保获得 ModuleNotFoundError: No module named 'pip'
第二步:下载PIP get-pip.py:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
第 3 步:安装 PIP:
python get-pip.py
确保 pip 已安装 运行 pip --version
确保它是最新的,截至目前 (21.2.4)。
我终于能够安装 pyopenssl :))
pip install pyopenssl