How to add pip packages/Ruby gems to a OpenStudio workflow (.osw)
Hello unmet hours community,
I am in the process of writing some python measures which are intended to work in a OpenStudio workflow (.osw), I came across this measure from PNNL
the measure uses the pip package copper by importing it in measure.rb like so:
import copper as cp
import typing
However by default the Openstudio cli the command
openstudio run --workflow
does not come with this pip package preloaded, so how can I load pip packages/ or Ruby gems into the OpenStudio cli?
Thank you!
---- EDIT and Solution
After digging deeper, just passing --python_path to the site_packages directory where a pip package is contained worked for me
For example this command -
openstudio --python_path ~/.pyenv/versions/3.12.3/lib/python3.12/site-packages run --workflow /mnt/c/openstudio-building-energy-standard-measures-gem/simple-python-measure.osw




@antonszilasi have you tried passing
--python_homeinstead?Hi Jeremy, yup just dug deeper and yes I got just passing python path to work thank you!