2

I have a master repo with repositories checked out at certain commits. All individual repositories are installable with the command:

pip install -r requirements.txt

from within the master-repository, I want to make it so you can install all the packages at once. The file structure is like:

├── aws_login_handler
│   ├── AWSLoginHandler
│   ├── requirements.txt
│   └── setup.py
├── datamodels
│   ├── BATDataModels
│   ├── requirements.txt
│   └── setup.py
├── gribmanager
│   ├── GribManager
│   ├── requirements.txt
│   └── setup.py
├── mongobase
│   ├── MongoBase
│   ├── requirements.txt
│   ├── setup.py
├── pyrtz
│   ├── PyRTZ
│   ├── requirements.txt
│   └── setup.py
├── routingserver
│   ├── requirements.txt
│   ├── RoutingServer
│   └── setup.py
├── runrouting
│   ├── requirements.txt
│   ├── RunRouting
│   └── setup.py
├── weatherrouting_v3
│   ├── BATWeatherRouting
│   ├── requirements.txt
│   └── setup.py
└── requirements.txt

Where I have added the requirements file:

-r ./datamodels/requirements.txt
-r ./mongobase/requirements.txt
-r ./routingserver/requirements.txt
-r ./runrouting/requirements.txt
-r ./weatherrouting_v3/requirements.txt
-r ./aws_login_handler/requirements.txt
-r ./gribmanager/requirements.txt

However when I run the command:

pip install -r requirements.txt

From the top level strucutre, the error:

ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

Is printed.

How can I create a way to install all the requirements of the sub modules?

sinoroc
  • 18,409
  • 2
  • 39
  • 70
Tom McLean
  • 5,583
  • 1
  • 11
  • 36
  • I think this is already answered here: https://stackoverflow.com/a/10429168/3202440 Hope this helps! – kavigun Sep 21 '22 at 11:06
  • Maybe a stray single dot `.` somewhere in one of the `requirements.txt` files. Without having access to the files or even the full terminal output, it is difficult to guess. – sinoroc Sep 21 '22 at 11:09

1 Answers1

0

Since you are using a relative path (./) you must add a setup.py in your main requirements folder.

Have a look at https://pip.pypa.io/en/stable/cli/pip_install/#argument-handling

Florin C.
  • 593
  • 4
  • 13