Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 1.91 KB

github_install.md

File metadata and controls

55 lines (45 loc) · 1.91 KB

Installation from github

This method of installation may allow you to test features in development that have not yet been included in the versioned PyPi release. Since development features may be fragile, this is probably only advisable if you are in contact with the author about a specific issue.

  1. Install conda using the miniforge installer for your OS, if not present.

  2. Install git for your OS, if not present (installing Git).

  3. Launch the Miniforge prompt (Windows) or any command prompt (MacOS, Linux) and enter the following to create a virtual environment for craterstats from github that is separate from the one for the PyPi version:

    conda create -n craterstats-github python=3.8
    
  4. Activate the virtual environment:

    conda activate craterstats-github
    
  5. Make a directory to hold the code (wherever you prefer, but probably in the user's home):

    mkdir craterstats-github
    cd craterstats-github   
    
  6. Clone the code from github:

    git clone https://github.com/ggmichael/craterstats.git
    
  7. Install the package requirements:

    pip install -r craterstats/requirements.txt
    
  8. Create access to program using single-word craterstats command:

    Windows:

    echo python %cd%\craterstats\src\craterstats.py %*>%CONDA_PREFIX%\craterstats.bat
    

    Linux/MacOS [untested]:

    echo "python $PWD/craterstats/src/craterstats.py $@" > $CONDA_PREFIX/craterstats.sh
    
  9. Check for successful installation with, e.g.:

    craterstats -about
    

Updating

You can update to the latest version on github using the command git pull from within the craterstats-github directory. If a new version reports missing packages, repeat the command:

pip install -r craterstats/requirements.txt