How to install a dependency from a submodule in Python?
问题 I have a Python project with the following structure (irrelevant source files omitted for simplicity): myproject/ mysubmodule/ setup.py setup.py The file myproject/setup.py uses distutils.core.setup to install the module myproject and the relevant sources. However, myproject requires mysubmodule to be installed (this is a git submodule). So what I am doing right now is: myproject/$ cd mysubmodule myproject/mysubmodule/$ python setup.py install myproject/mysubmodule/$ cd .. myproject/$ python