VOLTTRON / volttron

VOLTTRON Distributed Control System Platform
https://volttron.readthedocs.io/
Other
456 stars 216 forks source link

volttron start fails in develop #3154

Closed schandrika closed 6 months ago

schandrika commented 7 months ago

Describe the bug Starting volttron with develop branch code fails with "ModuleNotFound: No module named "requirements"

This does not happen in main

Cause - current directory -i.e. volttron root directory is not sys.path. This gets added automatically to path when volttron is built using code in main branch. However current directory is not getting added to sys.path when volttron is built and run from develop. Both branches use same version of python, setuptools, and all other libraries

Solution/workaround requirements.py is at the root level and is imported by setup.py, bootstrap.py and instance_setup.py(used by vcfg). instance_setup.py is the only file not at the same level as requirements.py, and it uses requirements.py only in specific use case(to install dependencies). Hence, moving the import of requirements.py into the specific function and explicitly updating sys.path within this function