(installation)=
CHAP is available over PyPI and can be installed with:
$ pip install ChessAnalysisPipelineCHAP is also available over conda-forge, allowing installation with, e.g.:
$ conda install -c conda-forge chessanalysispipeline(virtual_env_installation)=
- 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:
or use, for example:
$ python -m venv venv
if you have multiple Python versions on your system including python3.10 and your default version is below v3.10.$ python3.10 -m venv venv
- Activate the virtual environment:
$ source venv/bin/activate - Use the setup script to install the package:
You may have to install
$ python setup.py install
setuptoolsif this returnsIn this case, run:ModuleNotFoundError: No module named 'setuptools'$ pip install setuptools
- Install the required Python packages:
$ pip install -r requirements.txt
- Try running:
to confirm the package was installed correctly.
$ CHAP --help
- 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 .
(conda_installation)=
- 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:
Run the script with:
$ wget "https://github.com/conda-forge/miniforge/releases/latest/download/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).$ bash Miniforge3-$(uname)-$(uname -m).sh
- 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:with (pick the appropriate version string)::language: python :start-after: '[set version]' :end-before: '[version set]'version = 'v1.1'
- Create an editable
CHAPinstallation:or use the setup script to install the package:(CHAP) $ pip install -e .(CHAP) $ python setup.py install
- Try running:
to confirm the package was installed correctly.
(CHAP) $ CHAP --help