7

I have a projectA that depends on other projects. Some of them also my projects from private git repository. I listed all dependencies of projectA in requirements.txt for all my packages.

Now projectB that projectA depends of have dependencies also (listed in requirements txt and setup.py), but pip doesn't install them when I'm running pip install -r requirements.txt  for projectA.

user1685095
  • 5,787
  • 9
  • 51
  • 100
  • 1
    Not that I'm aware of; the [documentation](https://pip.readthedocs.org/en/1.1/requirements.html) says: "Requirement files are mostly flat. Maybe MyApp requires Framework, and Framework requires Library. I encourage you to still list all these in a single requirement file" –  Jan 23 '15 at 12:59
  • 1
    But then again, it seems I've learned something new: [recurusive requirements](https://pip.readthedocs.org/en/1.1/requirements.html#recursive-requirements). [edit: note that this is for pip version 1.1.] –  Jan 23 '15 at 13:03
  • 4
    In general, the easiest way to write a `requirements.txt` file is to install all of the required things into a virtualenv, then run `pip freeze >requirements.txt`. – Kevin Jan 23 '15 at 15:42
  • That's not convinient in my case, but thanks – user1685095 Jan 23 '15 at 15:43
  • 1
    Also, using recursive requirement files may eventually become a workaround for packages with dependencies outside PyPI. Such dependencies will continue to exist for various reasons, the least of which may be names already reserved on PyPI. – 0 _ Mar 27 '15 at 04:43

1 Answers1

0

snakebasket appears to be a wrapper of pip with exactly this design goal.

0 _
  • 10,524
  • 11
  • 77
  • 109
  • 1
    Just FYI snakebasket is not supported anymore and it's not compatible with the newest pip versions – fodma1 Oct 22 '15 at 14:43