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:\python27\packs pandas(-r requirements.txt)
2.安裝指定的離線包
pip install --no-index --find-links=d:\python27\packs\ pandas (-r requirements.txt)
原文地址:https://www.cnblogs.com/michael-xiang/p/5690746.html