Hello all,
It is possible to load custom python packages in the workflow by calling openstudio like so:
openstudio --python_path /path_to_python_packages run --workflow wkfl.osw
However I'd like to do this without adding the --python_path argument, I've tried a few things
- Setting the PYTHONPATH environment variable, this doesn't work for a OpenStudio workflow I believe its something to do with the OpenStudio source code
- Using the code in the measure
sys.path.insert(0, '/root/.pyenv/versions/3.12.3/lib/python3.12/site-packages')
where /root/.pyenv/versions/3.12.3/lib/python3.12/site-packages is the path to the custom python packages which we want to use in the measure this does work and I'm inclined to use something like this as a solution
Is there a better way then 2.? Or perhaps I'm missing something here?
I'd also like to ask what is the correct way to load custom python modules into a python measure on the OpenStudio server.
Thank you!


