Python 生成requirement 使用requirements.txt

python项目中必须包含一个 requirements.txt 文件,用于记录所有依赖包及其精确的版本号。以便新环境部署。

requirements.txt可以通过pip命令自动生成和安装

生成requirements.txt文件 pip freeze > requirements.txt

安装requirements.txt依赖 pip install -r requirements.txt

https://blog.51cto.com/meyangyang/2094937

原文地址:https://www.cnblogs.com/shiningrise/p/15705493.html