To install Corrfunc, you can either use pip or clone the repo from GitHub and build the source code. Either way, be sure to read the Dependencies section prior to installation.
The simplest way to install the latest release of the code is with pip. Before installation, be sure you have installed the package dependencies described in the Dependencies section
python -m pip install Corrfunc
This will install the latest official release of the code. If you want the latest master branch, you will need to build the code from source following the instructions in the next section.
Building from source¶
If you don’t install the latest release using pip, you can instead clone the cource code and call the setup file. Before installation, be sure you have installed the package dependencies described in the Dependencies section. The first step is to clone the Corrfunc repository
git clone https://github.com/manodeep/Corrfunc.git
python -m pip install . (--user)
The command-line version of Corrfunc needs the following packages to be installed:
make: 3.80 or later
C compiler: gcc >=4.6, clang, icc. Multi-threading will be disabled if the compiler does not support OpenMP.
gsl: any recent version
If you plan to use the C extensions, then the following are required:
Any of the above can be installed with either pip or conda.
Verifying your installation¶
After installing Corrfunc, you should run the integrated test suite to make sure that the package was installed correctly. If you installed from source, then run the following sequence from the repository root directory:
make tests # run the C tests
python -m pip install pytest
python -m pytest # run the Python tests
If you installed using pip/conda, then use the following to run the tests from your shell:
python -m pytest --pyargs Corrfunc
Once you have installed the package, see Getting started with Corrfunc for instructions on how to get up and running.