无网络环境用pip安装python类包

1、现在有网络的电脑安装相应的包

pip install django

2.安装完成后 打包

1)新建一个文件夹(package),用来存放包;

2)执行

pip list #查看安装的包
pip freeze >requirements.txt
pip install --download 路径:package -r requirements.txt

3.将打包好的 package文件夹和requirements.txt文件拷贝到无法联网的机器,进行安装

pip install --no-index --find-index=文件路径package -r requirements.txt

备注:

1.下载指定的包到指定文件夹

pip install --download d:python27packs pandas(-r requirements.txt)

2.安装指定的离线包

pip install --no-index --find-links=d:python27packs pandas (-r requirements.txt)

原文地址:https://www.cnblogs.com/michael-xiang/p/5690746.html

原文地址:https://www.cnblogs.com/noube/p/9070672.html