Install with newinstall.sh and eups distrib¶
This page guides you through installing the LSST Science Pipelines software. This installation method is recommended for anyone who uses or develops the Pipelines software.
If you have issues with the installation, here are two ways to get help:
The LSST Science Pipelines are developed and tested primarily on CentOS, but can be compiled and run on macOS, Debian, Ubuntu, and other Linux distributions. See Platform compatibility for information about LSST’s official reference platform and build reports with other platforms, and follow the instructions under System prerequisites to ensure you have installed the prerequisite software for your platform.
2. Make an installation directory¶
Create a directory where you want to install the LSST Science Pipelines into. For example:
mkdir -p lsst_stack
If you are installing the software for multiple users (a shared stack), see Setting unix permissions for shared installations.
3. Run newinstall.sh¶
Open a new shell session for the installation (or ensure you haven’t used LSST software in that shell before). If you need to reuse a shell, see Running newinstall.sh in an already set-up shell.
Next, run newinstall.sh to set up the environment you’ll install the LSST Science Pipelines into. For most use cases we recommend downloading and running newinstall.sh like this:
curl -OL https://raw.githubusercontent.com/lsst/lsst/26.0.0/scripts/newinstall.sh
bash newinstall.sh -ct
Always execute newinstall.sh with bash, as shown, regardless of what shell you’re in.
We recommend that you opt into the provided Miniconda Python environment (see the links below for more information).
Then load the LSST software environment into your shell:
source loadLSST.bash # for bash
source loadLSST.csh # for csh
source loadLSST.ksh # for ksh
source loadLSST.zsh # for zsh
To customize the conda environment used, set the
LSST_CONDA_ENV_NAME environment variable to a conda enviroment name when sourcing the file.
For other conda environments installed by LSST tools, this name will be the
rubin-env metapackage version prefixed with
lsst-scipipe- or the release tag files at `https://eups.lsst.codes/stack/src/tags/`_.
Here are ways to customize the newinstall.sh installation for specific needs:
The recommended installation uses precompiled binary tarballs if they’re available for your platform (and falls back to a source build). See About EUPS tarball packages. If you will be compiling and linking C++ code against this installation you’ll need to ensure your compilers match the distribution’s. Developers should review EUPS tarball packages and compiler compatibility.
For background information about newinstall.sh, see:
To find the
rubin-env conda metapackage version appropriate for a particular science pipelines release, see Release History.
4. Install Science Pipelines packages¶
The LSST Science Pipelines is distributed as the
lsst_distrib EUPS package.
Install the current version,
eups distrib install -t v26_0_0 lsst_distrib
curl -sSL https://raw.githubusercontent.com/lsst/shebangtron/main/shebangtron | python
If prebuilt binaries are available for your platform (and you ran newinstall.sh with the
-t argument) the installation should take roughly 10 minutes.
Otherwise, the installation falls back to a source build that can take two hours, depending on the top-level package and your machine’s performance.
See How to determine if tarball packages are available for your platform.
The last command, setup, activates the installed packages in your shell environment. You’ll need to run setup in each shell session you’ll use the LSST Science Pipelines in. See Setting up installed LSST Science Pipelines for more information.
v26_0_0is the current version corresponding to this documentation. You can install other tagged versions of the LSST Science Pipelines, though. See Installing other releases (including daily and weekly tags).
If you’re curious about the shebangtron, see its repository at github.com/lsst/shebrangtron.
5. Test your installation (optional)¶
Once the LSST Science Pipelines are installed, you can verify that it works by running a demo pipeline.
See Testing the Science Pipelines installation with a demo for instructions.
Now that you have a working LSST Science Pipelines installation, these topics will help you learn and do more:
Advanced installation topics¶
The above steps guided you through LSST’s recommended installation. These topics provide additional information about the installation and ways to customize it:
Running newinstall.sh in an already set-up shell¶
If you’ve run the LSST Science Pipelines previously, you may have conflicting environment variables in your shell. To be safe, run:
unset LSST_HOME EUPS_PATH LSST_DEVEL EUPS_PKGROOT REPOSITORY_PATH
Then return to the instructions step 3. Run newinstall.sh.
What newinstall.sh does¶
newinstall.sh creates a self-contained environment on your machine where you can install, run, and develop the LSST Science Pipelines. You activate this environment in a shell by sourcing the loadLSST script in the installation directory (see Setting up).
Here is how newinstall.sh prepares the environment:
Identifies your operating system and compilers to determine what EUPS binary packages should be installed (the EUPS package root, see About EUPS tarball packages).
Installs a specific version of Python, through Miniconda, that is compatible with EUPS binary packages (see About the Miniconda Python installed by newinstall.sh).
Installs Conda packages that the LSST Science Pipelines depend on (see System prerequisites).
Installs EUPS, the package manager used by the LSST software stack.
For information about newinstall.sh’s arguments, see newinstall.sh argument reference.
About the Miniconda Python installed by newinstall.sh¶
newinstall.sh can install a dedicated Python environment for your LSST Science Pipelines installation. This Python installation isn’t required, but we recommend it. See How to use your own Python with newinstall.sh if required.
The Python environment installed by newinstall.sh uses Miniconda, a minimal version of Anaconda. It provides the version of Python that we are currently using to test and develop the Science Pipelines.
In this Miniconda environment, newinstall.sh installs the libraries and tools needed to build and run the Science Pipelines.
This Miniconda installation won’t affect your other Python installations (like the system’s Python, your own Anaconda or Miniconda, or virtual environments).
The LSST Miniconda environment is only active when you source the
loadLSST script installed by newinstall.sh (see Setting up installed LSST Science Pipelines).
If you install other Python packages in a shell where the LSST Miniconda is activated (with mamba install or conda install or pip install) those packages are installed into the LSST Miniconda’s
site-packages, not your system’s.
We recommend that you use mamba install if possible (if the package is available from conda-forge), as it is much faster and generally more reliable than conda install, and it avoids some potential problems with pip install.
The Python installed by newinstall.sh is in an isolated Python environment dedicated to LSST Science Pipelines code and your own related modules.
This pattern is useful because it reduces the risk of having Python package version incompatibilities.
How to use your own Python with newinstall.sh¶
newinstall.sh creates a new Python environment by default (pre-configured with Python dependencies). If necessary, you can use your own pre-existing Python environment.
To do so, run newinstall.sh (see 3. Run newinstall.sh for details and command arguments).
When newinstall.sh prompts you to install Miniconda, type
Be aware of these caveats when using your own Python installation:
You are responsible for installing Python package dependencies. See System prerequisites.
Prebuilt binaries will not be available. eups distrib install will always install from source.
About EUPS tarball packages¶
EUPS distrib binary (tarball) packages significantly speed up your installation. Rather than compiling the LSST Science Pipelines from source, EUPS tarballs are prebuilt packages made specifically for supported platforms.
Platforms are defined by four factors:
EUPS distrib binary packages are currently being built for these platform combinations:
When you run newinstall.sh, it looks at your system to identify your operating system and compiler. The version of newinstall.sh you run also determines the Miniconda version and the lsstsw build system versions.
Together, these four factors define the URL prefix (called an EUPS package root) that eups distrib install looks for binary packages from. If binary tarballs are unavailable for that EUPS package root, eups distrib install automatically falls back to compiling LSST Science Pipelines packages from source.
You can see the active EUPS package roots on your system by running:
eups distrib path
Here is an example of the output:
Based on this example, eups distrib install will preferentially install EUPS distrib binary packages for the macOS 10.9 system,
clang-800.0.42.1 compiler, and
miniconda3-4.2.12-7c8e67 Python and lsstsw combination.
If eups distrib install cannot find packages at that EUPS package root it will look in the second EUPS package root (https://eups.lsst.codes/stack/src), which provides source packages.
How to determine if tarball packages are available for your platform¶
When you run eups distrib install, it will attempt to install prebuilt binary packages first and fall back to compiling the Science Pipelines if binary packages aren’t available for your platform (by default). This fallback is automatic. You’ll know packages are being compiled from source if you see compiler processes (like gcc or clang) load your machine.
The instructions in this section will help you diagnose why eups distrib install is falling back to a source installation.
First, get your EUPS package root URLs:
eups distrib path
If the only URL listed is https://eups.lsst.codes/stack/src, it means that newinstall.sh configured your environment to not use binary packages.
Try re-running newinstall.sh (see 3. Run newinstall.sh) with the
Also, ensure that you accept the default Miniconda Python environment.
If eups distrib path includes an additional URL that doesn’t end with
/src (for example,
https://eups.lsst.codes/stack/osx/10.9/clang-800.0.42.1/miniconda3-4.2.12-7c8e67), it means newinstall.sh has configured a binary package root.
The construction of the binary package root URL is based on your OS, compilers, and Python environment (see About EUPS tarball packages).
eups distrib install will only install binary packages if they exist on the binary package root. To check this, open the binary package root URL in a web browser. If the binary package root URL does not load in a browser it means LSST does not publish prebuilt binaries for your platform. Either continue the installation from source or consider using the LSST Docker images.
If the URL does open, though, search for files with a
.list file is created for each release that has binary packages.
The name of the
.list file matches the release tag (for example,
See Installing other releases (including daily and weekly tags) for more information about tags.
For example, if the binary package root is
https://eups.lsst.codes/stack/osx/10.9/clang-800.0.42.1/miniconda3-4.2.12-7c8e67 and you wish to install the
w_2017_33 tag, the file
https://eups.lsst.codes/stack/osx/10.9/clang-800.0.42.1/miniconda3-4.2.12-7c8e67/w_2017_33.list must exist for a binary installation.
.list file does not exist for the tag you want to install, but does exist for other tags in that EUPS package root, it may be due to an issue with the LSST binary package publishing system.
You can either continue with an installation from source, consider switching to a tag that is known to have binary packages, or consider using LSST’s Docker images.
EUPS tarball packages and compiler compatibility¶
EUPS binary tarball packages are prebuilt on LSST’s continuous integration servers for a specific combination of operating system, compilers, Python, and Python dependencies. If you are developing packages alongside this installation, you might encounter application binary interface (ABI) incompatibilities if are using a different compiler version or a different Python environment.
In this case, the more reliable solution is to revert to a source installation.
To do this, repeat the installation but run newinstall.sh without the
bash newinstall.sh -c
-t argument to newinstall.sh, eups distrib install will always build and install packages from source, ensuring ABI compatibility.
newinstall.sh argument reference¶
usage: newinstall.sh [-b] [-f] [-h] [-n] [-3|-2] [-t|-T] [-s|-S] [-P <path-to-python>]
Run in batch mode. Don’t ask any questions and install all extra packages.
Attempt to continue a previously failed install.
No-op. Go through the motions but echo commands instead of running them.
- -P <PATH_TO_PYTHON>¶
Use a specific python interpreter for EUPS.
Use Python 2 if the script is installing its own Python (unsupported by the LSST Science Pipelines
Use Python 3 if the script is installing its own Python. (default)
Allows eups distrib install to install prebuilt binary (tarball) packages, where available
Prevents eups distrib install from installing prebuilt binary (tarball) packages. (default)
Allows eups distrib install to compile and install packages from source (eupspkg). (default)
Do not use EUPS source “eupspkg” packages (do not compile from source). Prevents eups distrib install from compiling and installing packages from source (eupspkg).
Display a help message.