Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python “如何安装?”;皮普轮“;在没有互联网连接的机器上?_Python_Pip_Virtualenv_Python Wheel - Fatal编程技术网

Python “如何安装?”;皮普轮“;在没有互联网连接的机器上?

Python “如何安装?”;皮普轮“;在没有互联网连接的机器上?,python,pip,virtualenv,python-wheel,Python,Pip,Virtualenv,Python Wheel,我们有一台没有互联网连接的prod服务器,我希望能够执行“pip wheel” 我已经下载了virtualenv-1.9.tar.gz并将其复制到prod服务器并解压缩。首先,为什么pip轮不能立即使用 [ihadanny@lvshdc2en0012 ~]$ ./virtualenv-1.9/virtualenv.py venv/v1 New python executable in venv/v1/bin/python Installing setuptools............done

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

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

[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安装控制盘
,但没有成功

(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"
当然,
升级
无法工作(没有互联网连接…)

(v1)[ihadanny@lvshdc2en0012~]$pip安装--升级控制盘 无法获取索引基URL


我错过了什么

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

pip安装车轮-0.24.0/


不要忽略最后一条斜线。

pip安装控制盘
?谢谢@plg,但这也不行。对我来说,看起来你需要一个不同版本的pip。您正在使用哪个版本?此外,如果没有连接,则无法使用
pip安装控制盘
。oops!感谢@Marcs,显然我正在使用与virtualenv-1.9捆绑的pip,而我应该使用最新的virtualenv-1.11.6,根本原因是我没有注意到1.9<1.11:)