Skip to content

Commit

Permalink
Update installation instructions (#8524)
Browse files Browse the repository at this point in the history
* Update readme.md to mention .NET 9 instead of .NET 6

* Update readme.md with new versions of python, pandas and wrapt

* Update readme.md for vscode and vs
  • Loading branch information
JosueNina authored Jan 13, 2025
1 parent 6982f67 commit af7a2cf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
10 changes: 5 additions & 5 deletions .vs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ This document contains information regarding ways to use Visual Studio to work w

<h2>Option 1: Lean CLI</h2>

To use Lean CLI follow the instructions for installation and tutorial for usage in our [documentation](https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli).
To use Lean CLI follow the instructions for installation and tutorial for usage in our [documentation](https://www.quantconnect.com/docs/v2/lean-cli/key-concepts/getting-started).

<br />

<h2>Option 2: Install Locally</h2>

1. Install [.Net 6](https://dotnet.microsoft.com/download) for the project
1. Install [.Net 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) for the project

2. (Optional) Get [Python 3.8.13](https://www.python.org/downloads/release/python-3813/) for running Python algorithms
- Follow Python instructions [here](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-38) for your platform
2. (Optional) Get [Python 3.11.11](https://www.python.org/downloads/release/python-31111/) for running Python algorithms
- Follow Python instructions [here](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-311) for your platform

3. Get [Visual Studio](https://visualstudio.microsoft.com/vs/)

Expand All @@ -35,7 +35,7 @@ Your environment is prepared and ready to run lean

<h1>How to use Lean</h1>

This section will cover configuring, launching and debugging lean. This is only applicable to option 2 from above. This does not apply to Lean CLI, please refer to [CLI documentation](https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli)
This section will cover configuring, launching and debugging lean. This is only applicable to option 2 from above. This does not apply to Lean CLI, please refer to [CLI documentation](https://www.quantconnect.com/docs/v2/lean-cli/key-concepts/getting-started)

<br />

Expand Down
6 changes: 3 additions & 3 deletions .vscode/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ If you would like to mount any additional local files to your container, checkou

<h2>Option 3: Install Dependencies Locally</h2>

1. Install [.NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) for the project
1. Install [.NET 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) for the project

2. (Optional) Get [Python 3.8.13](https://www.python.org/downloads/release/python-3813/) for running Python algorithms
- Follow Python instructions [here](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-38) for your platform
2. (Optional) Get [Python 3.11.11](https://www.python.org/downloads/release/python-31111/) for running Python algorithms
- Follow Python instructions [here](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-311) for your platform

3. Get [Visual Studio Code](https://code.visualstudio.com/download)
- Get the Extension [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) for C# Debugging
Expand Down
33 changes: 16 additions & 17 deletions Algorithm.Python/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,43 @@ In addition, you can use [Skylight](https://www.quantconnect.com/skylight) to au
Before setting up python support, follow the [installation instructions](https://github.com/QuantConnect/Lean#installation-instructions) to get LEAN running C# algorithms on your machine.


## Installing Python 3.8:
## Installing Python 3.11:

Next we must prepare a Python installation for Lean to use. Follow the instructions for your OS.

<br />

### [Windows](https://github.com/QuantConnect/Lean#windows)

1. Use the Windows x86-64 MSI **Python 3.8.13** installer from [python.org](https://www.python.org/downloads/release/python-3813/) or [Anaconda](https://repo.anaconda.com/archive/Anaconda3-5.2.0-Windows-x86_64.exe) for Windows installer. "Anaconda 5.2" installs 3.5.2 by default, after installation of Anaconda you will need to upgrade python to make it work as expected: `conda install -y python=3.8.13`
1. Use the Windows x86-64 MSI **Python 3.11.11** installer from [python.org](https://www.python.org/downloads/release/python-31111/) or [Anaconda](https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Windows-x86_64.exe) for Windows installer.
2. When asked to select the features to be installed, make sure you select "Add python.exe to Path"
3. Create `PYTHONNET_PYDLL` environment variable to the location of your python dll in your installation (e.g. `C:\Dev\Python38\python38.dll` or `C:\Anaconda3\python38.dll`):
3. Create `PYTHONNET_PYDLL` environment variable to the location of your python dll in your installation (e.g. `C:\Dev\Python311\python311.dll` or `C:\Anaconda3\python311.dll`):
- Right mouse button on My Computer. Click Properties.
- Click Advanced System Settings -> Environment Variables -> System Variables
- Click **New**.
- Name: `PYTHONNET_PYDLL`
- Value: `{python dll location}`
4. Install [pandas=1.4.3](https://pandas.pydata.org/) and its [dependencies](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies).
5. Install [wrapt=1.14.1](https://pypi.org/project/wrapt/) module.
4. Install [pandas=2.1.4](https://pandas.pydata.org/) and its [dependencies](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies).
5. Install [wrapt=1.16.0](https://pypi.org/project/wrapt/) module.
6. Reboot computer to ensure changes are propagated.

<br />

### [macOS](https://github.com/QuantConnect/Lean#macos)

1. Use the macOS x86-64 package installer from [Anaconda](https://repo.anaconda.com/archive/Anaconda3-5.2.0-MacOSX-x86_64.pkg) and follow "[Installing on macOS](https://docs.anaconda.com/anaconda/install/mac-os)" instructions from Anaconda documentation page.
2. Set `PYTHONNET_PYDLL` environment variable to the location of your python dll in your installation directory (e.g. `/Users/{your_user_name}/anaconda3/lib/libpython3.8.dylib`):
1. Use the macOS x86-64 package installer from [Anaconda](https://repo.anaconda.com/archive/Anaconda3-2024.02-1-MacOSX-x86_64.pkg) and follow "[Installing on macOS](https://docs.anaconda.com/anaconda/install/mac-os)" instructions from Anaconda documentation page.
2. Set `PYTHONNET_PYDLL` environment variable to the location of your python dll in your installation directory (e.g. `/Users/{your_user_name}/anaconda3/lib/libpython3.11.dylib`):
- Open `~/.bash-profile` with a text editor of your choice.
- Add a new line to the file containing
```
export PYTHONNET_PYDLL="/{your}/{path}/{here}/libpython3.8.dylib"
export PYTHONNET_PYDLL="/{your}/{path}/{here}/libpython3.11.dylib"
```
- Save your changes, and either restart your terminal *or* execute
```
source ~/.bash-profile
```
2. Install [pandas=1.4.3](https://pandas.pydata.org/) and its [dependencies](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies).
3. Install [wrapt=1.14.1](https://pypi.org/project/wrapt/) module.
2. Install [pandas=2.1.4](https://pandas.pydata.org/) and its [dependencies](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies).
3. Install [wrapt=1.16.0](https://pypi.org/project/wrapt/) module.

<br />

Expand All @@ -74,20 +74,19 @@ Next we must prepare a Python installation for Lean to use. Follow the instructi
1. Install Python using miniconda by following these commands; by default, **miniconda** is installed in the users home directory (`$HOME`):
```
export PATH="$HOME/miniconda3/bin:$PATH"
wget https://cdn.quantconnect.com/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh
bash Miniconda3-4.5.12-Linux-x86_64.sh -b
rm -rf Miniconda3-4.5.12-Linux-x86_64.sh
conda update -y python conda pip
wget https://cdn.quantconnect.com/miniconda/Miniconda3-py311_24.9.2-0-Linux-x86_64.sh
bash Miniconda3-py311_24.9.2-0-Linux-x86_64.sh -b -p /opt/miniconda3
rm -rf Miniconda3-py311_24.9.2-0-Linux-x86_64.sh
```
2. Create a new Python environment with the needed dependencies
```
conda create -n qc_lean python=3.8.13 pandas=1.4.3 wrapt=1.14.1
conda create -n qc_lean python=3.11.11 pandas=2.1.4 wrapt=1.16.0
```
3. Set `PYTHONNET_PYDLL` environment variable to location of your python dll in your installation directory (e.g. `/home/{your_user_name}/miniconda3/envs/qc_lean/lib/libpython3.8.so`):
3. Set `PYTHONNET_PYDLL` environment variable to location of your python dll in your installation directory (e.g. `/home/{your_user_name}/miniconda3/envs/qc_lean/lib/libpython3.11.so`):
- Open `/etc/environment` with a text editor of your choice.
- Add a new line to the file containing
```
PYTHONNET_PYDLL="/home/{your_user_name}/miniconda3/envs/qc_lean/lib/libpython3.8.so"
PYTHONNET_PYDLL="/home/{your_user_name}/miniconda3/envs/qc_lean/lib/libpython3.11.so"
```
- Save your changes, and logout or reboot to reflect these changes

Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ NOTE: Visual Studio for Mac [has been discontinued](https://learn.microsoft.com/

- Install [Visual Studio Code for Mac](https://code.visualstudio.com/download)
- Install the [C# Dev Kit extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit)
- Install [dotnet 6 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0):
- Install [dotnet 9 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0):
- To build the solution, either:
- choose **Run Task** > **build** from the Panel task dropdown, or
- from the command line run
Expand All @@ -159,7 +159,7 @@ NOTE: Visual Studio for Mac [has been discontinued](https://learn.microsoft.com/
### Linux (Debian, Ubuntu)
- Install [dotnet 6](https://docs.microsoft.com/en-us/dotnet/core/install/linux):
- Install [dotnet 9](https://docs.microsoft.com/en-us/dotnet/core/install/linux):
- Compile Lean Solution:
```
dotnet build QuantConnect.Lean.sln
Expand Down

0 comments on commit af7a2cf

Please sign in to comment.