Windows Installation Instructions
As of version 0.3.1, an URBANopt™ installer (64-bit Windows 7 – 10) is available to install the URBANopt CLI, Ruby 2.5.x, and OpenStudio SDK at the same time. If you’d rather install the dependencies manually, view the manual install section below.
For CLI usage examples, see our usage examples page
Install with the URBANopt installer
-
Download the desired version of the .exe installer.
-
Use the GUI installer and choose a directory to install. Once installed, open a terminal and run the provided setup script for that shell (below are the setup scripts for each respective shell environment).
Note: GitBash is recommended
GitBash
c:/urbanopt-cli-X.X.X/setup-env.sh
. ~/.env_uo.sh
Powershell
c:\urbanopt-cli-X.X.X\setup-env.ps1
. ~\.env_uo.ps1
Windows Command Prompt
c:\urbanopt-cli-X.X.X\setup-env.bat
%HOMEPATH%\.env_uo.bat
Important Note Each time you want to work on URBAnopt and you open a new terminal to do so, you will need to run the env_uo
script to configure your terminal session environment:
GitBash
. ~/.env_uo.sh
Powershell
. ~\.env_uo.ps1
Windows Command Prompt
%HOMEPATH%\.env_uo.bat
Manual Install
-
Install Ruby 2.5 (x64)
Make sure that you select option 3: MSYS2 and MINGW development toolchain during the installation process:
-
Include path to Ruby by adding the following to your environment variables path:
C:\Ruby25-x64\bin
-
Create a new environment variable
HOME
and set the variable value to the following:C:\Users\<user_name>
Detailed instructions for creating environment variables can be found online.
-
Install Bundler version 2.1:
gem install bundler -v 2.1
-
Install OpenStudio 3.1.0
-
Create file
C:\ruby-2.5.5-1-x64-mingw32\lib\ruby\site_ruby\openstudio.rb
and edit it to contain the path to your installed OpenStudio (where X.X.X is the OpenStudio version installed):require 'C:\openstudio-X.X.X\Ruby\openstudio.rb'
-
Verify your OpenStudio and Ruby configuration:
ruby -e "require 'openstudio'" -e "puts OpenStudio::Model::Model.new"
Expected output:
OS:Version, {<long-uuid>}, !- Handle 3.1.0; !- Version Identifier`
-
Install the URBANopt Command Line Interface (CLI). This should not take longer than a few minutes. Visit the known issues page if the installation stalls.
gem install urbanopt-cli
URBANopt CLI Usage
-
View available CLI commands with:
uo --help
-
For detailed instructions, see the usage examples page.
OpenDSS and DiTTo Reader Set-up
As of version 0.4.0, the URBANopt CLI includes DiTTo/OpenDSS support. Since this functionality is implemented in Python, a different set of dependencies must be installed in order to use it.
If you’d like to use this functionality, follow the OpenDSS installation instructions.
Note that Windows users may experience some difficulty during the install (particularly with the environment variable setup). If you are not able to access the opendss command via the CLI, you can always access it manually by following the general OpenDSS instructions.