How to create a requirements.txt? [duplicate]

2020-02-21 10:27发布

I'm wondering how I can create a suitable requirements.txt for my Python 3 application?

3条回答
做个烂人
2楼-- · 2020-02-21 10:32

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.

查看更多
forever°为你锁心
3楼-- · 2020-02-21 10:35

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

查看更多
老娘就宠你
4楼-- · 2020-02-21 10:50

type following line in your command prompt

pip freeze > requirements.txt
查看更多
登录 后发表回答