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

Revision history [back]

click to hide/show revision 1
initial version

How to add pip packages to a OpenStudio workflow

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 a pip package cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these pip packages preloaded, how can I load pip packages into the OpenStudio cli?

How to add pip packages to a OpenStudio workflow

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 a pip package cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these pip packages preloaded, how can I load pip packages into the OpenStudio cli?

How to add pip packages to a OpenStudio workflowworkflow (.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 a pip package cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these pip packages preloaded, how can I load pip packages into the OpenStudio cli?

Thank you!

How to add pip packages 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 a pip package cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these pip packages preloaded, preloaded, how can I load pip packages into the OpenStudio cli?

Thank you!

How to add pip packages 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 a pip package cooper cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these pip packages preloaded, preloaded, how can I load pip packages into the OpenStudio cli?

Thank you!

How to add pip packages 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 a the pip package cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these pip packages preloaded, how can I load pip packages into the OpenStudio cli?

Thank you!

How to add pip packages 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 cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By default the Openstudio cli the command

openstudio run --workflow

does not come with these this pip packages package preloaded, so how can I load pip packages into the OpenStudio cli?

Thank you!

How to add pip packages 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 cooper by importing it in measure.rb like so:

import copper as cp 
import typing

By 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 into the OpenStudio cli?

Thank you!

How to add pip packages 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 cooper 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 into the OpenStudio cli?

Thank you!

How to add pip packages 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 cooper 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 packages/ or Ruby gems into the OpenStudio cli?

Thank you!

How to add pip packages 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 cooper 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!

How to add pip packages 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 coopercopper 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!

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!

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

After trying the suggestion below by Jeremy

openstudio --python_path ~/.pyenv/versions/3.12.3/bin/ run --workflow /mnt/c/openstudio-building-energy-standard-measures-gem/simple-python-measure.osw

I am able to run the .osw with python however the site_packages for python are not there.

When I try to set Python Home however I then get this error

image description

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

After trying the suggestion below by Jeremy

openstudio --python_path ~/.pyenv/versions/3.12.3/bin/ run --workflow /mnt/c/openstudio-building-energy-standard-measures-gem/simple-python-measure.osw
simple-python-measure.osw

I am able to run the .osw with python however the site_packages for python are not there.

When I try to set Python Home however I then get this error

image description

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

After trying the suggestion below by Jeremy

openstudio --python_path ~/.pyenv/versions/3.12.3/bin/ run --workflow simple-python-measure.osw

I am able to run the .osw with python however the site_packages (pip packages) for python are not there.there even though they are there when I just run them with python

When I try to set Python Home however I then get this error

image description

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

After trying the suggestion below by Jeremy

openstudio --python_path ~/.pyenv/versions/3.12.3/bin/ run --workflow simple-python-measure.osw

I am able to run the .osw with python however the site_packages (pip packages) for python are not there even though they are there when I just run them with python

When I try to set Python Home however I then get this error error, I am still digging into this

image description

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 trying the suggestion below by Jeremy

openstudio --python_path ~/.pyenv/versions/3.12.3/bin/ run --workflow simple-python-measure.osw

I am able digging deeper, just passing python home to run the .osw with python however the site_packages (pip packages) directory where a pip package is contained worked for python are not there even though they are there when I just run them with python

When I try to set Python Home however I then get this error, I am still digging into this

image descriptionme

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 home --python_home to the site_packages directory where a pip package is contained worked for me

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_home--python_path to the site_packages directory where a pip package is contained worked for me

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