Installation
Install on Windows
Introduction
It takes 10 minutes to install Local Platform and about 1 hour to download the latest LEAN image. The Local Platform requires Docker. When you launch Local Platform, we scan for Docker and prompt you to install it to continue. We run all algorithms in a Docker container to avoid installing any dependencies on your computer.
Requirements
Windows systems must meet the following minimum requirements to run Local Platform:
- A 64-bit processor
- 4 GB RAM or more
- Windows 10, version 1903 or higher (released May 2019)
- Hardware virtualization enabled in the BIOS
- 60 GB hard drive or more
You need an internet connection for things like downloading updates, collaborating with team members, and syncing your projects with QuantConnect Cloud. Trading Firm and Institution organizations can run local backtests and research notebooks without an internet connection for up to 24 hours.
Install Docker
If you run the LEAN engine locally with QuantConnect Local Platform, LEAN executes in a Docker container. These Docker containers contain a minimal Linux-based operating system, the LEAN engine, and all the packages available to you on QuantConnect.com. It is therefore required to install Docker if you plan on using QuantConnect Local Platform to run the LEAN engine locally.
Follow these steps to install Docker:
- Follow the Install Docker Desktop on Windows tutorial in the Docker documentation.
- Restart your computer.
- If Docker prompts you that the WSL 2 installation is incomplete, follow the instructions in the dialog shown by Docker to finish the WSL 2 installation.
- Open PowerShell with adminstrator privledges and run:
As you install docker, enable WSL 2 features.
$ wsl --update
By default, Docker doesn't automatically start when your computer starts. So, when you run the LEAN engine with QuantConnect Local Platform for the first time after starting your computer, you must manually start Docker. To automatically start Docker, open the Docker Desktop application, click Start Docker Desktop when you log in check box.
, and then enable theInstall Local Platform
Follow these steps to install Local Platform:
- Install Docker.
- Open a terminal and download the latest LEAN image.
- Install Visual Studio Code.
- Install Local Platform.
$ docker pull quantconnect/lean
It takes about an hour to download the image. While it's downloading, continue to the next step. When you use Local Platform, it automatically pulls the latest LEAN image if your current version is more than a week old.
If you open Visual Studio Code and it asks you to log in to QuantConnect, you successfully installed Local Platform.
Next Steps
Log in to your account and then set up your first organization workspace.
After you install Local Platform, follow these steps:
- Log in to your account.
- Set up your first organization workspace.
- Install the Python stubs for autocomplete.
Troubleshooting
The following sections explain how to solve some issues you may encounter while installing Local Platform.
Docker with WSL 2 Features
When you download Docker Desktop, you need to select the Enable WSL 2 Features check box. After you install Docker and restart your computer, if Docker prompts you that the WSL 2 installation is incomplete, follow the instructions in the dialog shown by Docker to finish the WSL 2 installation.
Windows Security
If you can't synchonize your workpace, follow these steps to configure controlled folder access on your computer:
- Press the Windows key to open the Start Menu.
- In the search bar, enter "Ransomware protection" and then press Enter.
- On the Ransomware protection page, enable controlled folder access.
- Click .
- Click and then click from the drop-down menu.
- Allow lean.exe.
Docker Not Found
If you have Docker installed but the Local Platform can't detect it, update your to be the path to your Docker executable. setting
LEAN CLI Account Syncronization
Local Platform and the LEAN CLI share your login credentials. If you log in to your account on Local Platform or the LEAN CLI, you log into that account for both Local Platform and the LEAN CLI.
Further Support
For further support with installing Local Platform, contact us.