0

I created an object-oriented simulation in python that has multiple files with dependencies between them. At the time, I didn't know any better and I didn't create a requirements.txt. I was wondering what the best way is to approach this. I am thinking creating a requirements.txt for each file, and then combining them into one requirements.txt for the whole project (I intend on posting that in my GitHub)

I would love some feedback.

2 Answers2

1

I suggest you to use virtual environments. Create one and install the packages until you successfully run the code. The following materials will help. Automatically create requirements.txt How to use virtualenv with Python?

0

Unless the files are for running independent processes/programs, I think a unified requirements.txt makes sense.

You can do this by running the following command in the terminal:

pip freeze > requirements.txt
JackHacks
  • 262
  • 1
  • 12