Package Installation¶
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.
Using pip¶
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
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
cd Corrfunc
make install
python setup.py install
Dependencies¶
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 type the following in the root package directory,
make tests
If you installed using pip/conda, then use the following to run the tests
from Corrfunc.tests import tests
tests()
Once you have installed the package, see Getting started with Corrfunc for instructions on how to get up and running.