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


source to share


3 answers


enter the following line at the command line



pip freeze > requirements.txt

      

+17


source


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


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







All Articles