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
python pip requirements.txt


source to share


3 answers


enter the following line at the command line



pip freeze > requirements.txt

      

+17


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


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


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics