Link Search Menu Expand Document

Mac Installation Instructions

As of version 0.3.1, an URBANopt installer (Mac OSX >= 10.12) is available to install the URBANopt CLI, Ruby, 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 Getting Started page

We also have tutorial videos available to guide you through the installation steps.

Install with the URBANopt Installer

Follow the steps below or watch the Mac Installer Video.

  1. Download the desired version of the .dmg package.

  2. Use the GUI installer and choose a directory to install. Once installed, open a terminal and run the provided setup script. The setup-env.sh generates env variables and stores them in a file .env_uo.sh in your home directory:

     /Applications/UrbanOptCLI_X.X.X/setup-env.sh
     . ~/.env_uo.sh
    
  3. When launching new shell terminals, run . ~/.env_uo.sh to setup the environment.

Manual Install

Follow the steps below or watch the Mac Manual Installation Video.

  1. Install Ruby 2.7.2. We recommend using rbenv to manage and install Ruby
    • brew install rbenv
    • rbenv install 2.7.2
    • Do not forget the rbenv init step of rbenv installation
    • Once installed, you may check which versions of Ruby have been installed and which one is active with: rbenv versions
    • Set your current directory to use Ruby 2.7.2 with: rbenv local 2.7.2
    • Full documentation for rbenv can be found at the rbenv github site
  2. Install Bundler version 2.1:

     gem install bundler -v 2.1
    
  3. Install OpenStudio 3.7.0

  4. Add the RUBYLIB path as an “environment variable”, pointing to the OpenStudio Ruby location you just installed. You can use a text editor such as TextEdit, Sublime Text, vi or nano to open .bash_profile (or .zshenv if using zsh, the default since MacOS 10.15 Catalina). The following is an example using nano:

    1. Type the following in the terminal: nano ~/.bash_profile (or nano ~/.zshenv)
    2. Copy and paste export RUBYLIB=/Applications/OpenStudio-X.X.X/Ruby (where X.X.X is the OpenStudio version installed) at the top of the file
    3. Press control-x to exit, then y to save the changes, and the return key to go back to the terminal
  5. Install the URBANopt Command Line Interface (CLI):

     gem install urbanopt-cli
    

URBANopt CLI Usage

  1. View available CLI commands with:

     uo --help
    
  2. For detailed instructions, see the Getting Started page.

URBANopt Python Dependencies

As of version 0.9.0, the URBANopt CLI has integrated 3 python workflows: OpenDSS, DES, and DISCO. To install these python dependencies, a new URBANopt CLI command has been created. The following command will install python and pip as well as the python packages urbanopt-ditto-reader, geojson-modelica-translator, and nrel-disco.

uo install_python

The python installation path will be printed in the terminal once python is successfully installed; you may want to save this path for use in future troubleshooting.

DES Installation

As of version 0.5.2, the URBANopt CLI includes DES support. This functionality is implemented in Python and Modelica and requires that additional dependencies be installed before use.

While the GeoJSON Modelica Translator will be installed automatically with the UO CLI install_python command, follow the DES Installation Instructions to install additional dependencies related to this workflow.


URBANopt, Copyright (c) 2019-2024, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.