Hi,
I have been trying to figure out which Python versions are compatible with LEAN CLI and there seems to be missing/contradicting information in the docs/github/pypi.
The docs doesn't seem to refer to any kind of python version requirement:
the docs related to installing LEAN Engine is empty:
However in LEAN github repo under Algorithm.Python this is stated:
“Setup Lean Locally with Python … Installing Python 3.6: … Use the Windows x86-64 MSI Python 3.6.8 installer from python.org or Anaconda for Windows installer. … Install pandas=0.25.3 and its dependencies…”
But then again in the Lean CLI github repo, there is no mention of any Python version requirement:
However on Pypi it is stated as Requires: Python >= 3.6
Am I mixing up LEAN CLI vs Engine requirements? If the CLI requirement is just Python ≥3.6, can I backtest a machine learning model trained with a package that requires Python 3.8 work? Any clarification and info is greatly appreciated!
Note: I am thinking of using LEAN only locally. I think there are other package and Python version limitations when using LEAN on QuantConnect Cloud.
Fred Painchaud
Hi Notta,
I had and seen people have problems while installing LEAN CLI with Python 3.10. I don't recommend.
I used Python 3.6, 3.7, 3.8 and 3.9 without any issues.
Fred
Nottakumasato
Fred Painchaud was just able to run a backtest in a virtual environment with Python 3.9.12 without any problem. And the logs show that the docker image has Python 3.6.8 so I guess Python version requirement is only for the docker image not for LEAN CLI. Thanks!
Nottakumasato
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!