I am using the TensorFlow object detection API in a Python project. In order to run the code in PyCharm I include the location of the TensorFlow git repository's models/research directory as a "Content Root". When I run the code at command line I include this directory location in PYTHONPATH. This is simple enough, but I'd like to eliminate the need for users to take care of this legwork if it's possible to have the TensorFlow object-detection module installed into the environment along with the other dependencies of my project's package.
I have tried adding the following to my requirements.txt to no avail (i.e. pip install requirements.txt hangs):
-e git+https://github.com/tensorflow/models.git#egg=research
I have also tried reading all lines from requirements.txt in setup.py for dependency links, but using this approach doesn't work either when I run python setup.py install.
In the Object Detection API Demo there is a clone of the repository and then an install via
cd models/research
pip install .
Can something like this be done via an appropriate entry in the requirements.txt and/or some code in the setup.py of my project?
My goal is to not get a ModuleNotFoundError when my code calls import object_detection, etc. if users haven't already installed the TensorFlow object detection API into their Python environment "by hand".