Skip to content

Latest commit

 

History

History
126 lines (118 loc) · 3.72 KB

File metadata and controls

126 lines (118 loc) · 3.72 KB

(installation)=

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

(virtual_env_installation)=

Using a Python virtual environment

  1. Clone the CHAP repository:
    $ git clone https://github.com/CHESSComputing/ChessAnalysisPipeline.git
  2. Change to the CHAP repository directory:
    $ cd ChessAnalysisPipeline
  3. Make sure that your Python version is at least 3.10. To check your Python version, execute:
    $ python --version
  4. 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.
  5. Activate the virtual environment:
    $ source venv/bin/activate
  6. Use the setup script to install the package:
    $ python setup.py install
    You may have to install setuptools if this returns
    ModuleNotFoundError: No module named 'setuptools'
    
    In this case, run:
    $ pip install setuptools
  7. Install the required Python packages:
    $ pip install -r requirements.txt
  8. Try running:
    $ CHAP --help
    to confirm the package was installed correctly.
  9. 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 CHAP installation:
    $ pip install -e .

(conda_installation)=

Using a Conda environment

  1. 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).
  2. Navigate to a suitable directory and clone the CHAP repository:
    $ git clone https://github.com/CHESSComputing/ChessAnalysisPipeline.git
  3. Change to the CHAP repository directory:
    $ cd ChessAnalysisPipeline
  4. Activate the miniforge3 base environment:
    $ source <path_to_miniforge3_dir>/bin/activate
  5. Create the CHAP environment:
    (bash) $ mamba env create -f environment.yml
  6. Activate the CHAP environment:
    (bash) $ conda activate CHAP
  7. Set a valid version number. In setup.py, replace:
    :language: python
    :start-after: '[set version]'
    :end-before: '[version set]'
    
    with (pick the appropriate version string):
    version = 'v1.1'
  8. Create an editable CHAP installation:
    (CHAP) $ pip install -e .
    or use the setup script to install the package:
    (CHAP) $ python setup.py install
  9. Try running:
    (CHAP) $ CHAP --help
    to confirm the package was installed correctly.