The most straightforward way to install yt_astro_analysis is to first install yt. This will take care of all yt_astro_analysis dependencies. After that, yt_astro_analysis can be installed with pip:

$ pip install yt-astro-analysis

If you use conda to manage packages, you can install yt_astro_analysis from conda-forge:

$ conda install -c conda-forge yt-astro-analysis

Note, the package name is spelled with hyphens (yt-astro-analysis) when installing from pip or conda. With pip, the package name can be spelled with either hyphens or underscores, but with conda it must always be hyphens.

Installing from source

To install from source, it is still recommended to first install yt in the manner described above. Then, clone the git repository and install like this:

$ git clone
$ cd yt_astro_analysis
$ pip install -e .

Installing with Rockstar support


As of yt_astro_analysis version 1.1, yt_astro_analysis runs with the most recent version of rockstar-galaxies. Older versions of rockstar will not work.

Rockstar support requires yt_astro_analysis to be installed from source. Before that, the rockstar-galaxies code must also be installed from source and the installation path then provided to yt_astro_analysis. Two recommended repositories exist for installing rockstar-galaxies, this one, by the original author, Peter Behroozi, and this one, maintained by John Wise.


If using Peter Behroozi’s repository, the following command must be issued after loading the resulting halo catalog in yt:

ds = yt.load(...)
ds.parameters["format_revision"] = 2

To install rockstar-galaxies, do the following:

$ git clone
$ cd rockstar-galaxies
$ make lib

Then, go into the yt_astro_analysis source directory and add a file called “rockstar.cfg” with the path the rockstar-galaxies repo you just cloned. Then, install yt_astro_analysis.

$ cd yt_astro_analysis
$ echo <path_to_rockstar> > rockstar.cfg
$ pip install -e .

Finally, you’ll need to make sure that the location of is in your LD_LIBRARY_PATH.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_rockstar>