So I'm trying to get setup locally. I get its open source but a lot of the links in the readme's are invalid(https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli) and some seem to conflict with github instructions(https://www.quantconnect.com/docs/v2/lean-cli/projects/autocomplete#07-Imports) so I assume github is the most accurate. This is the steps I've taken so far, I'll list it for troubleshooting and if anyone searches this and needs a clear step by step, here we go:
- Download install python3.8/pip : added it to pathway, also added PYTHONNET_ PYLL pathway to environment variables
- Download Anaconda - includes WRAPT / PANDAS allegedly*, also added to pathway
- Install .net 6- did not add to path
- pip install lean
- Install VS Code - plus extensions (lean/Python/Pylance/C#/Docker/Remote/.net/.netwatch attach/.net install tool/Jupyter/Jupyter keymap) - extensions were recommended, I don't think I need all of them but idk
- Install Git
- Clone Lean master from github to local drive: /VS/LeanProjects/Lean
- Install Docker
- pip lean init in /VS/LeanProjects
- Update config in Launcher folder
- algorithm name: BasicTemplateFrameworkAlgorithm.py
- language: python
- directory: c:/…./projects/lean/basicTemplateFrameworkAlgorithm.py
- debugging: true
- debug method: debugpy
- Launch Docker
- Launch VS code and connect to docker
- open and debug BasicTemplateFrameworkAlgorithm.py
- Visual Code Error window: “launch:program'/com.docker.devenvironments.code/Launcher/Debug/QuantConnect.Lean.Launcher.dll' does not exist
- .NET Core SDK cannot be located. .Net core debugging will not be enabled
- Can anyone tell me what the launcher.dll is?
2 Also it is just suppose to be 'from AlgorithmsImports imports * at the top of the algorithms for local autocomplete or the long list on https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-36
Thanks a bunch
Fred Painchaud
Hi Troy,
I was giving you an extensive reply but then I lost it browsing the LEAN CLI v2 docs… damn browsers… 😊.
So here is the short version:
Fred
Troy Contegiacomo
Some github links kick back to this page which I'm assuming was suppose to be superseded by the documentation on quantconnect. I think through the process of my first attempts at setup locally something got messed up because I did an OS reinstall, went through the process from scratch and I can actually write imports without vs code throwing an error. The imports from github and quantconnect doc page differ. I've tried both and they don't seem to be autocompleting to any stubs from lean cli, only normal python. I did get this error, "The "python.pythonPath" setting in your settings.json is no longer used by the Python extension…" could that be a cause?
Troy Contegiacomo
Update, Tried to change it. Still doesn't work
Troy Contegiacomo
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!