# 2. Installing¶

The code has been tested with the December 2016 release of Python:

The packages listed below are required to run ASteCA.

Important

If you want to use the function that obtains the cluster probability of being a true cluster (see Sect. 9), the ks statistical package is needed. This package needs R and rpy2. These are not mandatory and ASteCA will still run without them, except of course the above mentioned function.

## 2.1. Working environment¶

We use the conda package and environment manager to install all the necessary dependencies to run ASteCA in an isolated Python environment. To install it:

1. Go to https://conda.io/miniconda.html and download the appropriate version for your system. I recommend using the Python 3.6 version and will assume in what follows that you are running a 64 bit Linux system.

2. Install with

$bash Miniconda3-latest-Linux-x86_64.sh  Select yes when asked: Do you whish the installer to prepend the Miniconda3 install location to PATH in your ~/path? 3. Close and re-open your terminal window for the changes to take effect. Move inside the directory where you extracted the ASteCA package. 4. Create a virtual environment with $ conda create --name asteca27 python=2.7.14 matplotlib=2.2.0 numpy=1.14.1 scipy=1.0.0 astropy=2.0.4

5. Activate the environment

$source activate asteca27  (for Windows users the command is $ activate asteca27)

Important

You can tell that the environment is activated because its name is now shown in the terminal before the $ symbol as: (asteca27)$


You need to activate this environment each time before attempting to run ASteCA, otherwise no installed packages will be detected.

6. Finally (optionally), you can install the dependencies needed for the ks package with:

$conda install -c bioconda r-ks$ conda install rpy2


Currently the r-ks package is not available for Windows systems.

If you are a Fedora user, you’ll probably need to install a few extra libraries for the rpy2 package to work. In the case of Fedora 26, I had to install the following libraries:

$dnf install mesa-libGLU-9.0.0-11.fc26.x86_64$ dnf install ncurses-compat-libs-6.0-8.20170212.fc26.x86_64


but these can change for different Fedora versions. No extra libraries where needed in any of the Ubuntu-based systems I tested.