Installation - AyyerLab/Clement GitHub Wiki

Here are some more detailed installation and running instructions. You can install the 'stable' version of the package or get the latest version by installing from source.

pip installation

The easiest and recommended way to install the program is via the python package index (PyPi).

  • Create a python3 environment using conda or virtualenv. This is an isolated python environment where you can install packages without affecting the system installation and where you do not need super-user access rights. You can skip this step if you are not worried about dependency hell on your system. Clement tries to be a nice citizen by not having very specific version requirements for other packages but the same may not be possible for other programs you use.

    • If you have Anaconda already installed, use the following commands:

      $ conda create -n clement python=3.7 pip
      $ conda activate clement
      

      where clement is the name of the environment, but you can choose whatever name you like. To leave the environment use the command

      $ conda deactivate
      
    • Alternatively, you can use virtualenv instead of Anaconda:

      $ pip install virtualenv # If it is not installed already
      $ cd project_directory # Directory where you want to install the package
      $ virtualenv venv
      $ source venv/bin/activate
      

      To leave the environment, use

      $ deactivate
      
  • Once you are inside the environment, run the following command to install the package and its dependencies:

    $ pip install clement
    

    Every time you want to use the program, just activate the environment using one of the commands above and run the following command from the command line:

    $ clement
    

Installation from source

Here are the instructions to install the program from source using Anaconda to resolve the dependencies.

  • Download Miniconda if you do not already have it.
  • Clone this repository
$ git clone https://github.com/AyyerLab/Clement.git
$ cd Clement
  • Create a conda environment using the environment.yml file provided:
    $ conda env create -f environment.yml
    $ conda activate clement-dev
    
  • You can now run the program directly by running ./run_local
  • Alternately, you can add the current snapshot to your environment using
    $ pip install -e .
    
    The executable clement will then be available in your path.
  • In order to compile to an executable, run
    $ pyinstaller install.spec
    
    This will create a single file executable in the dist/ folder which you can use directly and on other computers with compatible platforms.