Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

You have a few options:

  • python -m pip install --target=C:/openstudioapplication-1.9.0/EnergyPlus/python_lib -r requirements.txt

    • This is actually how we package extra python modules such as pandas, numpy, pytest etc in the OS SDK CLI
  • Start your script with import sys; sys.path.insert(0, "/path/to/custom/folder"). That custom folder could be in the resources/subdirectory of your measure.

    • Caveat: This would only work if you don't have or depend on another module that has a native extension (a compiled C/C++ extension) that is not packaged by the OS SDK yet.
  • Running in the OS SDK CLI directly, you have more flags

Options:

 Python Options:
  --python_path DIR                Add additional directory to add to front of PYTHONPATH environment variable (may be used more than once)
  --python_home DIR                Set PYTHONHOME environment variable