1,现在有网的环境,下载setuptools和pip 压缩包:
setuptools 的下载网站:https://pypi.python.org/packages/45/29/8814bf414e7cd1031e1a3c8a4169218376e284ea2553cc0822a6ea1c2d78/setuptools-36.6.0.zip#md5=74663b15117d9a2cc5295d76011e6fd1
pip:
https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
下载安装包
例如:安装pytest包得时候会顺带安装pytest依赖包
离线下载安装包
下载单个离线包 - pip download -d your_offline_packages <package_name>
批量下载离线包 - pip download -d your_offline_packages -r requirements.txt
离线安装
安装单个离线包 - pip install --no-index --find-links=/your_offline_packages/ package_name
批量安装离线包 - pip install --no-index --find-links=/your_offline_packages/ -r requirements.txt
2,将以上压缩包,传入无网环境:解压
解压后进入setuptools目录,执行:python setup.py install
然后进入pip解压目录执行:python setup.py install