我们有一台没有互联网连接的prod服务器机器,我希望能够执行" pip wheel"。
我已将virtualenv-1.9.tar.gz
下载复制到prod服务器并将其解压缩。首先,为什么不能立即获得点轮?
[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 无法获取索引基础网址https://pypi.python.org/simple/
我错过了什么?答案 0 :(得分:4)
如果更新pip,您仍然可以使用该虚拟环境,但最好更新到最新的virtualenv。如果您没有连接下载wheel源包,请将其解压缩并使用:
pip install wheel-0.24.0 /
不要忽略最后的斜杠。