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.
Note
This documentation does not cover the LSST Simulations software. See the LSST Simulations installation documentation instead.
If you have difficulty installing LSST software:
- review the known installation issues for your platform.
- reach out on the Support forum at community.lsst.org.
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:
- Install Anaconda if you want a complete, science-ready Python installation with minimal setup.
- Otherwise, install the leaner Miniconda version and install packages as you need them.
Warning
You need the Python 2 (e.g. Miniconda2) distribution. If you want to use the experimental Python 3 support, you should try our source installation.
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 6 7 8 | conda config --add channels http://conda.lsst.codes/stack/0.13.0
conda create --name lsst python=2
source activate lsst
conda install lsst-distrib
source eups-setups.sh
setup lsst_distrib
You can ignore warnings about pre-link and post-link scripts being dangerous and deprecated. Sorry about that.
|
Warning
Installing the LSST simulation tools (including MAF) requires pointing to a different Conda channel. See the LSST Simulations installation documentation.
Here’s what these commands are doing, line-by-line:
- Tell conda about the LSST channel for Conda packages.
- 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. - 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
). - Install the full suite of LSST science software, including Science Pipelines (
lsst-distrib
). - Setup EUPS, LSST’s package manager.
- Setup LSST packages in your environment with EUPS (setting up
lsst_distrib
makes most packages available to you).
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 3 | source activate lsst
source eups-setups.sh
setup lsst_distrib
|
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.