Skip to content

Installation

Setting Up a Python Environment

T3CO depends on Python>=3.8 and <=3.10. To create an environment containing the appropriate Python version and a built-in pip, there are two preferred ways:

  1. First option is to use conda:

    Bash
    conda create -n t3co python=3.10
    conda activate t3co
    
  2. The other option is using venv

    Bash
    python3.10 -m venv t3co
    

    On macOS/Linux, activate the environment:

    Bash
    source t3co/bin/activate
    

    On Windows Powershell:

    Bash
    t3co\Scripts\activate
    

Installing T3CO Python Package

T3CO is available on PyPI and as a public access GitHub repository. This gives the user two ways of installing the T3CO Python Package.

1. Installing From PyPI

T3CO can be easily installed from PyPI. This is the preferred method for using T3CO to run analysis with input files. To install the latest release:

Bash
pip install t3co

To install a specific version (for example T3CO v1.0.8):

Bash
pip install t3co==1.0.8

2. From GitHub

T3CO can also be installed directly from the GitHub repository for accessing demo input files and running T3CO using the Command Line Interface.

First, clone the repository from GitHub:

Bash
git clone https://github.com/NREL/T3CO.git T3CO

From within the Python environment Navigate to the parent directory containing the T3CO repository e.g. cd GitHub/T3CO/ and run:

Bash
pip install -e .
This installs the local version of the T3CO clone along with all its dependencies.

FASTSim is installed along with other library dependancies. In case of ModuleNotFoundError: No module named 'fastsim' error:

Bash
pip install fastsim==2.1.1

Check that the right version of T3CO is installed in your environment:

Bash
pip show t3co

If there are updates or new releases to T3CO that don't show in the local version, use a git pull command the latest version from the main branch on the repo:

Bash
git pull origin main

Copying T3CO Demo Input Files

The t3co.resources folder contains all the necessary input files needed for running T3CO. However, it sometimes is difficult to navigate to these files when installing. To help with this, run this command on the Command Line Interface.

Bash
install_t3co_demo_inputs

The user will receive these questions on the command line:

Do you want to copy the T3CO demo input files? (y/n):

Enter the path where you want to copy demo input files:

Choose y and provide the desired destination path to get a demo_inputs folder containing the t3co.resources files copied to your local directory. To copy the folder to the current directory you are on, answer the second question with ".".

Running your first analysis

To learn about the tool and run your first T3CO analysis, proceed to the Quick Start Guide