2

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

我已经下载virtualenv-1.9.tar.gz复制到产品服务器并提取它。首先,为什么不能立即使用点子轮?

[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/

我错过了什么?

4

1 回答 1

4

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

pip install wheel-0.24.0/

不要省略最后的斜线。

于 2014-12-02T18:42:36.787 回答