Running a conda installation and an eups distrib installation, + a git repo version of a package, on the same machine

First of all, this is not recommended. The eups provided with the conda installation and the eups provided with the source (eups distrib) installation are two different copies of eups and you could run into conflicts if you don’t keep them separate. It’s much simpler to choose a stack installation method and then simply use that method.

However, in some very specific situations, it can be useful to be able to have both conda and source installations on the same machine-- and in fact, this is in response to a request from the opsim team for one of these specific situations – and it certainly is possible.

I’ll assume you have installed the sims stack using eups distrib, for a source installation, with a root directory of ~/lsstEups.
I’ll also assume you have installed the sims stack using the conda binaries, and your root conda installation for this purpose is at ~/miniconda.

  • Do not use the miniconda installed with the LSST stack as the location for your conda installation, you must add another installation of mini- or ana- conda. The problem is that the miniconda provided by the LSST stack must be managed/setup by the source-installed eups, but then the lsst conda packages installed into miniconda must be managed by the conda-installed eups, and the two will conflict in this situation. It’s probably possible to use the same independent conda installation for both, if it was not eups-managed by LSST, but this seems like it’s asking for trouble.

To use any LSST packages, you must start up eups and then setup the packages you need. The commands are similar, but slightly different, to use eups distrib installed packages and to use conda installed packages.

To setup sims_maf from the eups distrib installed packages, you would do:

load ~/lsstEups/loadLSST.csh
setup sims_maf -t sims

and to setup sims_maf from the conda installed binaries, you would do:

source ~/miniconda/bin/eups-setups.csh
setup lsst-sims-maf

Do not do both of these in the same shell, because this would cause confusion.

Adding a git repo version of pure python package, such as the sims packages, is fairly simple and you can even use the same copy of the package with both versions of your stack.

  • Let’s assume you wanted the git repo version of sims_operations (and you will put it into ~/lsstRepos)

  • Git clone the package (do this once).

cd ~/lsstRepos
git clone https://github.com/lsst/sims_operations.git

  • Do you want to use the new git version of sims_operations with your eups distrib installed stack? Start up your eups distrib version of eups, set up the package and go.

source ~/lsstEups/loadLSST.csh
setup -r ~/lsstRepos/sims_operations

  • Do you want to use the new git version of sims_operations with your conda installed stack? (in a different shell!) Start up your conda version of eups, set up the package and go.

source ~/miniconda/bin/eups-setups.csh
setup -r ~/lsstRepos/sims_operations

Note that in both cases above, I did not do an “eups declare” step, but just did setup -r ~/lsstRepos/sims_operations (the package directory).
This is a more ad-hoc way to setup a package, that does not require an eups declaration, but it also means eups won’t “remember” anything about the package after you’re done, so you must specify the directory name each time.

You could still do an eups declare for your conda installation (as in the example Installing/Running conda sims stack + replacing a package with the git repo version) and you could even also do an eups declare for your eups distrib installation, but keep in mind that if you eups declare it for conda, then the eups-distrib version of eups still won’t know anything about the package, so you’d have to do this twice if you wanted the package declared to both of the conda and eups distrib stack installations.