pip freeze >/tmp/wheel_pip/requirements.txt
这个命令会把当前环境下面的pip安装包名,都放到文件中html
pip wheel --wheel-dir=/tmp/wheel_pip pip pip wheel --wheel-dir=/tmp/wheel_pip wheel
若是没有wheel,就pip install wheel
安装python
pip wheel --wheel-dir=/tmp/wheel_pip -r requirements.txt
wget https://bootstrap.pypa.io/get-pip.py
tar cf /tmp/wheel_pip wheel_pip.tar
把wheel_pip.tar
复制到离线的服务器,解压bootstrap
cd /tmp/ & tar xf wheel_pip.tar ./
python get-pip.py --no-index --find-links=/tmp/wheel_pip
pip install --no-index --find-links=/tmp/wheel_pip wheel
pip install --no-index --find-links=/tmp/wheel_pip -r requirements.txt pip install --no-index --find-links=/data1/upload/wheel_pip -r /data1/upload/wheel_pip/requirements.txt
pip wheel --wheel-dir=/data1/anchor/lujianxing/ celery #指定包的版本 pip wheel --wheel-dir=/data1/anchor/lujianxing/ celery==3.1.18
wheel包的地址服务器
ll /data1/anchor/lujianxing/celery-3.1.18-py2.py3-none-any.whl
cd /data1/upload/ pip install celery-3.1.18-py2.py3-none-any.whl
未经许可,请不要转载。ui
参考code