Installation

MacOS

Step 1: Install Python

If you already have Python installed, you can skip this step. To check your Python version, open a terminal and type:

python3 --version

If the output is command not found: python3, or the version is lower than Python 3.9, then you will need to install Python.

To install Python, download the installer from: Mac Installer Python 3.10.

Once the install has finished, check to make sure that it’s using the correct version:

python3 --version

Step 2: Choose Install Folder

You can install LEAP in any folder. For this example, we’ll use my_folder. To create this folder, open a terminal and type:

mkdir my_folder
cd my_folder

Step 3: Create a Virtual Environment

When working with Python, it’s best to create a virtual environment to keep your packages separate from the system Python. To create a virtual environment, type:

python3.x -m venv env
source env/bin/activate

where python3.x is your Python version. For example, if you installed Python with the installer above, you installed python3.10, so the command would be:

python3.10 -m venv env
source env/bin/activate

Step 4: (Optional) Setup Git Token

If you haven’t used git on the command line before, you will need to set up a personal access token. This is so you can install the LEAP package from GitHub. To do this:

  1. Go to GitHub Settings: Tokens to create a personal access token.

  2. Click on Tokens: classic and then Generate new token (classic).

  3. Set the expiration to No expiration so you don’t have to do this again. If you want more security, set an earlier date.

  4. Tick all the boxes available, and click Generate token.

  5. Copy this token. You won’t be shown it again.

  6. In your terminal, type:

git config --global credential.helper osxkeychain

Step 5: Install LEAP

To install the LEAP package, type:

pip3 install git+https://github.com/resplab/leap.git

To install a specific release:

pip3 install git+https://github.com/resplab/leap.git@vx.y.z

where vx.y.z is the release version you would like to install. To see all the releases, go to: LEAP Releases.

(Optional) If you set up your git token in the last step, you will now be asked for you username and password. Paste the token in as your password:

Username for 'https://github.com': YOUR_GIT_USERNAME # not your email address
Password: YOUR_TOKEN # not your GitHub password

Step 6: Install Success!

Now that you’ve successfully installed the LEAP package, you can start using it. To get started, see the Command-Line Interface documentation.

To get out of the virtual environment:

deactivate

Developers

If you want to develop this package, please see the installation instructions for developers: Developer Installation.