Installation

Installing pip

Introduction

The Lean CLI is distributed as a Python package, so it requires pip to be installed. Because pip is distributed as a part of Python, you must install Python before you can install the CLI. If you want to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you.

This page contains installation instructions for Anaconda, which is a Python distribution containing a lot of packages that are also available when running the LEAN engine. Having these packages installed locally makes it possible for your editor to provide autocomplete for them.

The Python distribution from the Microsoft Store is not supported.

Install on Windows

Follow these steps to install Anaconda on your computer:

  1. Download the latest 64-bit Graphical Installer for Windows.
  2. Run the installer and click Next.
  3. Read the licensing terms and click the I Agree check box.
  4. Select the Just Me check box and click Next.
  5. Select the destination folder to install Anaconda in (make sure this path does not contain spaces) and click Next.
  6. In the Advanced Options, enable the Add Anaconda3 to my PATH environment variable and Register Anaconda3 as my default Python 3.x check boxes and then click Install.
  7. After the installation has completed, restart your computer to make sure changes are propagated.
  8. Open a terminal and run:
    $ conda update --all

Install on macOS (Intel)

Follow these steps to install Anaconda on your Mac with an Intel chip:

  1. Download the latest 64-bit Graphical Installer for macOS.
  2. Click Continue on the Introduction, Read Me, and License pages.
  3. Agree to the license by clicking Agree.
  4. Click Install on the Installation Type page to install to start the installation.
  5. After the installation has finished, click Continue on the PyCharm IDE page and Close on the Summary page to close the installer.

Install on macOS (Apple)

Anaconda does not support Apple chips. Follow these steps to install Miniforge, a minimal version of Anaconda, on your Mac with an Apple chip:

  1. Download Miniforge3-MacOSX-arm64.sh.
  2. Open a terminal in the directory containing the installer.
  3. Run bash Miniforge3-MacOSX-arm64.sh to start the installer.
  4. Press Enter to view the license terms, press Q to exit the license terms, and enter Yes to accept the license terms.
  5. Specify where Miniforge should be installed or accept the default.
  6. Enter Yes when the installer prompts whether you want the installer to initialize Miniforge.
  7. Re-open the terminal window after the installation has finished.

Install on Linux

Follow these steps to install Anaconda on your computer:

  1. Download the latest 64-bit (x86) Installer for Linux.
  2. Open a terminal in the directory containing the installer.
  3. Run bash <fileName> where <fileName> is the name of the installer.
  4. Press Enter to view the license terms, press Q to exit the license terms, and enter Yes to accept the license terms.
  5. Specify where Anaconda should be installed or accept the default.
  6. Enter Yes when the installer prompts whether you want the installer to initialize Anaconda.
  7. Re-open the terminal window after the installation has finished.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: