How do I create a requirements .txt file?

I am wondering how can I create a suitable .txt file for my Python 3 application?


source to share

3 answers

enter the following line at the command line

pip freeze > requirements.txt




unless you are in virtualenv and don't want to put all the packages you installed in a requirements file like the accepted answer. just use pigar



There is a module called pipreqs which is for creating a requirements file.

pip install pipreqs
pipreqs /GitHub/FolderName #Insert path to file


Add location to folder where python files are located. Pipreqs will create a requirements.txt file in the folder.



All Articles