目录
生成 requirements.txt
pip 方式
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
pip list
和 pip freeze
命令可以查看已安装的包。文章源自编程技术分享-https://mervyn.life/33a69c73.html
pip list
➜ ~ pip list
Package Version
----------------- ----------
amqp 2.3.2
asn1crypto 0.24.0
astroid 2.1.0
autopep8 1.4.4
bcrypt 3.1.6
billiard 3.5.0.5
certifi 2018.11.29
cffi 1.12.3
cli-helpers 1.2.0
pip list --format=freeze > requirements.txt
pip freeze
➜ ~ pip freeze
amqp==2.3.2
asn1crypto==0.24.0
astroid==2.1.0
autopep8==1.4.4
bcrypt==3.1.6
billiard==3.5.0.5
certifi==2018.11.29
cffi==1.12.3
pip freeze > requirements.txt
pipreqs
pipreqs 可以用来查找项目依赖并生成requirements.txt文章源自编程技术分享-https://mervyn.life/33a69c73.html
pip install pipreqs
pipreqs application_path
安装 requirements.txt 中的依赖
pip install -r requirements.txt
文章源自编程技术分享-https://mervyn.life/33a69c73.html 我的微信公众号
微信扫一扫
评论