I'm wondering how I can create a suitable requirements.txt for my Python 3 application?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
This question already has answers here:
Closed 2 years ago.
回答1:
type following line in your command prompt
pip freeze > requirements.txt
回答2:
There's a module called pipreqs which is designed for creating the requirements file.
pip install pipreqs
pipreqs /GitHub/FolderName #Insert path to file
Add the location to the folder where the python files reside. Pipreqs will create a requirements.txt file in the folder.
回答3:
if you aren't in virtualenv and don't feel like putting all your installed packages in the requirements file like the accepted answer. just use pigar