Installation
Using pip
CHAP is available over PyPI and can be installed with:
$ pip install ChessAnalysisPipeline
Using conda
CHAP is also available over conda-forge, allowing installation with, e.g.:
$ conda install -c conda-forge chessanalysispipeline
Installing CHAP from source on a Linux system
Using a Python virtual environment
Clone the
CHAPrepository:$ git clone https://github.com/CHESSComputing/ChessAnalysisPipeline.git
Change to the
CHAPrepository directory:$ cd ChessAnalysisPipeline
Make sure that your Python version is at least 3.10. To check your Python version, execute:
$ python --version
Create the Python virtual environment:
$ python -m venv venv
or use, for example:
$ python3.10 -m venv venv
if you have multiple Python versions on your system including python3.10 and your default version is below v3.10.
Activate the virtual environment:
$ source venv/bin/activate
Use the setup script to install the package:
$ python setup.py install
You may have to install
setuptoolsif this returnsModuleNotFoundError: No module named 'setuptools'
In this case, run:
$ pip install setuptools
Install the required Python packages:
$ pip install -r requirements.txt
Try running:
$ CHAP --help
to confirm the package was installed correctly.
Note that you have to reinstall the package again when you want code changes to have an effect. To avoid this you can create an editable
CHAPinstallation:$ pip install -e .
Using a Conda environment
Create a base Conda environent, e.g. with Miniforge. Download the installer appropriate for your computer’s architecture using curl or wget or your favorite program, for example:
$ wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
Run the script with:
$ bash Miniforge3-$(uname)-$(uname -m).sh
Then accept the license terms, pick the default or choose a suitable Miniforge3 installation directory, and select “no” or press enter when prompted to proceed with the initialization (unless you want the script to make changes to you shell profile to automatically initialize conda, which is not recommended).
Navigate to a suitable directory and clone the
CHAPrepository:$ git clone https://github.com/CHESSComputing/ChessAnalysisPipeline.git
Change to the
CHAPrepository directory:$ cd ChessAnalysisPipeline
Activate the miniforge3 base environment:
$ source <path_to_miniforge3_dir>/bin/activate
Create the
CHAPenvironment:(bash) $ mamba env create -f environment.yml
Activate the
CHAPenvironment:(bash) $ conda activate CHAP
Set a valid version number. In
setup.py, replace:version = '0.0.1'
with (pick the appropriate version string):
version = 'v1.1'
Create an editable
CHAPinstallation:(CHAP) $ pip install -e .
or use the setup script to install the package:
(CHAP) $ python setup.py install
Try running:
(CHAP) $ CHAP --help
to confirm the package was installed correctly.