1

Is there a way to consolidate, or better yet, create a hierarchical requirements file in a given repo to be used across multiple virtual environments...perhaps in yaml format, so I can handle version exceptions for specific projects? I have found that when I am working on various project environments with their own requirements.txt files, many of which share many dependencies between the various environment requirements files, so it would be nice if I can update my semantic versioning in one single location, instead of an variety of requirements.txt files.

  • You can have as many requirements files as you want. It is not uncommon to have `requirements.txt`, `requirements-dev.txt` and `requirements-tests.txt` for example. So, you can have a global one and one per project. You just need to install them in order or reference one in the other. – Klaus D. Mar 16 '22 at 18:07
  • Does this answer your question? [Split requirements files in pip](https://stackoverflow.com/questions/11704287/split-requirements-files-in-pip) – Iain Shelvington Mar 16 '22 at 18:11
  • That is a reasonable idea to cut back on the number of files I have to update my versioning on, so I do appreciate that. Is there any way to point all of the projects to a single file, and be able to organize them centrally, or is multiple files the only viable approach? – Brian Martin Mar 16 '22 at 18:13

0 Answers0