Installing and Using LSST Science Pipelines as a Conda Package

This page will guide you through installing the LSST Science Pipelines as a Conda package for use in Anaconda or Miniconda. Anaconda is a popular Python distribution and package ecosystem. With this installation method you don’t compile source code, or even need to have an existing Python installation.

If you have difficulty installing LSST software:

Note

Users of LSST Simulations (such as the Metrics Analysis Framework, MAF) should following the LSST Simulations Installation documentation instead of this page. The Simulations group publishes their own Conda channel that includes compatibility patches for the Simulations stack.

1. Install Anaconda or Miniconda

You might already have Anaconda or Miniconda as your main Python distribution. If not, you can quickly get started by following Continuum’s official installation instructions:

If you’re new to Anaconda, Continuum’s 30-minute test drive tutorial will get you up-to-speed.

Warning

Don’t reuse the Miniconda you might have previously obtained from an eups distrib-based installation. Open a new shell and install Anaconda/Miniconda from scratch.

Upgrading conda

If you have an existing Anaconda or Miniconda installation, you’ll want to make sure the conda command itself is up to date:

conda update conda

See the Conda documentation for more information about installing and managing conda and Anaconda/Miniconda.

2. Install Science Pipelines in a Conda Environment

These commands will download and activate the LSST Science Pipelines in a new Conda environment:

1
2
3
4
5
conda config --add channels http://conda.lsst.codes/stack
conda create --name lsst python=2
source activate lsst
conda install lsst-distrib lsst-sims
source eups-setups.sh

Here’s what these commands are doing, line-by-line:

  1. Tell conda about the LSST channel for Conda packages.
  2. Create a Conda environment called lsst with Python 2.7. You can change the environment’s name to anything you like. Conda environments are recommended since they help keep the Python dependencies of your projects separate. See the Conda documentation on environments for more information.
  3. Activate the lsst environment (use your environment’s name if you chose a different one). The activate command is provided by Anaconda/Miniconda (e.g. at ~/miniconda2/bin/activate).
  4. Install the full suite of LSST science software, including Science Pipelines (lsst-distrib) and LSST Simulations (lsst-sims). Installating lsst-sims is optional.
  5. Setup LSST packages in your environment with EUPS.

Warning

If the install fails with an error, check that your shell does not have another EUPS Stack configured (try echo $EUPS_STACK). Conda packaged EUPS will use existing values of EUPS_PATH and EUPS_DIR. If they exist, unset them before installing or using Conda packages.

3. Activating Science Pipelines in a new Shell

Whenever you open a new shell or terminal session, use these commands to re-activate your previously-installed Science Pipelines:

1
2
source activate lsst
source eups-setups.sh

These commands can also be used to switch from one Conda environment and LSST Science Pipelines installation to another.

4. Testing Your Installation

Once the LSST Science Pipelines are installed, you can verify that it works by running a demo project. This demo processes a small amount of SDSS data.