gpt4 book ai didi

python - 如何在没有互联网连接的机器上安装 "pip wheel"?

转载 作者:行者123 更新时间:2023-11-28 22:46:36 25 4
gpt4 key购买 nike

我们有一台没有互联网连接的生产服务器机器,我希望能够执行“pip wheel”。

我已经下载了 virtualenv-1.9.tar.gz 复制到 prod 服务器并解压。首先,为什么不能立即使用 pip wheel?

[ihadanny@lvshdc2en0012 ~]$ ./virtualenv-1.9/virtualenv.py venv/v1
New python executable in venv/v1/bin/python
Installing setuptools............done.
Installing pip...............done.
[ihadanny@lvshdc2en0012 ~]$ source venv/v1/bin/activate
(v1)[ihadanny@lvshdc2en0012 ~]$ which pip
~/venv/v1/bin/pip
(v1)[ihadanny@lvshdc2en0012 ~]$ pip wheel
ERROR: unknown command "wheel" - maybe you meant "help"

我已经开始下载并复制 wheel-0.24.0.tar.gz,但只安装了 wheel,没有安装 pip wheel:

(v1)[ihadanny@lvshdc2en0012 ~]$ pip install wheel-0.24.0.tar.gz
Unpacking ./wheel-0.24.0.tar.gz
Running setup.py egg_info for package from file:///x/home/ihadanny/wheel-0.24.0.tar.gz
no previously-included directories found matching 'wheel/test/*/dist'
no previously-included directories found matching 'wheel/test/*/build'
Installing collected packages: wheel
Running setup.py install for wheel
no previously-included directories found matching 'wheel/test/*/dist'
no previously-included directories found matching 'wheel/test/*/build'
Installing wheel script to /x/home/ihadanny/venv/v1/bin
Successfully installed wheel
Cleaning up...
(v1)[ihadanny@lvshdc2en0012 ~]$ pip wheel
ERROR: unknown command "wheel" - maybe you meant "help"

编辑:我也试过 pip install wheel 没有用

(v1)[ihadanny@lvshdc2en0012 ~]$ pip install wheel
Requirement already satisfied (use --upgrade to upgrade): wheel in ./venv/v1/lib/python2.6/site-packages
Cleaning up...
(v1)[ihadanny@lvshdc2en0012 ~]$ pip wheel
ERROR: unknown command "wheel" - maybe you meant "help"

当然 upgrade 无法工作(没有互联网连接...)

(v1)[ihadanny@lvshdc2en0012 ~]$ pip install --upgrade wheel 无法获取索引基 URL https://pypi.python.org/simple/

我错过了什么?

最佳答案

如果您更新 pip,您仍然可以使用该虚拟环境,但最好将 a 更新到最新的 virtualenv。如果您没有连接,请下载 wheel源码包,解压使用:

pip install wheel-0.24.0/

不要省略最后的斜杠。

关于python - 如何在没有互联网连接的机器上安装 "pip wheel"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27255965/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com