1

I just have finished the project with Python. I need to add requirements.txt. Is there a way in a command line to list all the dependencies I have been using along with their versions?

I have researched but it looks like I need to go manually through every single one of them, I was wondering if there is a better way to accomplish this?

Thank you.

Chique_Code
  • 1,422
  • 3
  • 23
  • 49
  • 2
    The _best_ way to do this is to add them as you go. Are you working in a virtual environment? `pip freeze > requirements.txt` should give you a starting point, but you may get a bunch of stuff there that you don't really need. – ChrisGPT was on strike Jun 11 '20 at 17:09
  • Does this answer your question? [List dependencies in Python](https://stackoverflow.com/questions/42237072/list-dependencies-in-python) – ChrisGPT was on strike Jun 11 '20 at 17:09

1 Answers1

0

to do that you need to type the following command pip/pip3 freeze

after that you can copy the dependencies into the requirements.txt file

AkIonSight
  • 365
  • 3
  • 13