在想要迁移的沙盒中生成 requirements.txt文档
pip freeze > requirements.txt
在一台有网络的电脑中批量下载所有的依赖包到xxx文件夹
pip download --destination-directory xxx -r requirements.txt
想要迁移的地方
-新建沙盒
virtualenv -p /usr/bin/python3 venv
-进入沙盒
source venv/bin/activate
批量安装
pip install --no-index --find-links=xxx -r requirements.txt
网友评论