将当前的python环境导出
将当前的python环境导出

将当前的python环境导出

将当前的python 环境,导出为 requirement.txt

pip freeze > requirements.txt   #将python 环境写入txt文档当中

然后通过 以下语句,从requirements.txt当中安装依赖

pip install -r requirements.txt  -i https://pypi.tuna.tsinghua.edu.cn/simple  

本文转自 https://zhuanlan.zhihu.com/p/456856668,如有侵权,请联系删除。

发表回复

您的电子邮箱地址不会被公开。