How do I create a requirements .txt file?
I am wondering how can I create a suitable .txt file for my Python 3 application?
+3
Daniel Santos
source
to share
3 answers
enter the following line at the command line
pip freeze > requirements.txt
+17
Pawan
source
to share
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
+1
Mohamed
source
to share
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.
0
siddhantsomani
source
to share