close

How to create a requirements.txt?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to create a requirements.txt in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to create a requirements.txt?

  1. How to create a requirements.txt?

    There's a module called pipreqs which is designed for creating the requirements file.
    pip install pipreqs pipreqs /GitHub/FolderName #Insert path to file

  2. create a requirements.txt

    There's a module called pipreqs which is designed for creating the requirements file.
    pip install pipreqs pipreqs /GitHub/FolderName #Insert path to file

Method 1

type following line in your command prompt

pip freeze > requirements.txt

Method 2

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.

Conclusion

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read