First of all, all I want to do is run python (correct version 3.6.8, or whatever is necessary) in any repl and be able to
`>> import QuantConnect`
as some of the docs say.
Note: I run Ubuntu 20.04, but I know my way around Linux enough to be able to adapt instructions from other Linux versions.
I've followed instructions here:
https://github.com/QuantConnect/Lean#linux-debian-ubuntu
And here:
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/readme.md#linux
And even here::
https://www.quantconnect.com/forum/discussion/8506/vscode-run-python-strategy-offline-with-linux/p1
And I can't get anything to work. Where are the instructions to get Lean/QC running natively on Linux? Each of the docs linked above give bits and pieces of instructions, but even all together I don't believe they enable a native Linux installation.
Please no one tell me to "just use Jupyter with the Docker container" or "it works with Visual Studio" or whatever. It should be very possible to run Lean/QC in native Python on Linux, but none of the docs that I have found run through the installation or "getting started" process end-to-end.
For reference, I'm new to QC, but I'm an experienced data scientist and developer. Is there a set of docs I haven't found yet?
Also of note: I'm not trying to be a problem. I really want QC to be successful, but there are a LOT of posts in this forum about installation problems. Why am I 3+ hours into attempting to install Lean without success? (not counting the "use Jupyter from Docker" instructions, which I've been able to do)
Is there something I can help with?
Thanks in advance for the help.
Jared Broad
Hi Brian, we're probably not going to support local installations given how hard it is; but we do support dockerized ones.
pip install lean
This does everything for you in a perfect dockerized setup that works on all OS and ARM/AMD chipsets.
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.
Brian G
Thanks Jared Broad for the quick response.
When you say "dockerized setup" are you including the jupyter notebook server in the container, or is there a way to use the dockerized version with any text editor?
I strongly prefer not to use jupyter/notebooks in this case, and I'm looking for a way to avoid jupyter.
The instructions here:
https://github.com/QuantConnect/Lean#linux-debian-ubuntuseem to want to accomplish that, but very few usable packages are installed by `pip install lean` and `conda install lean`. It looks like I can't do anything with this except start a Jupyter notebook and use that.
Can you confirm that using Jupyter notebooks through the docker container is pretty much the only way to develop?
If not, can you point me to the instructions for using Lean/QC that don't involve Jupyter or VS Code?
Thanks again!
Jared Broad
https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli
It's not related to VS Code or Jupyter / those are tools that help you with local installations but not required.
LEAN CLI is a preconfigured way of running LEAN locally. You can use any code editor you want.
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.
Foren Power
Just my 2 cents. I'm a fan of this guy.
https://www.youtube.com/watch?v=0mKQ-pjEGj4&t=38sBrian G
Thanks Jared Broad for the suggestion, but I think that was the first (or maybe second?) method I tried last week. You're right that's a very straight-forward install and use case, but for me it's missing a crucial piece because the instructions assume that you already have a working algorithm.
I am trying to build algorithms, and for that I'm trying to get to the `from QuantConnect import *` at the bottom of these docs:
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/readme.md#linuxbut I'm having problems with these as well---certain steps fail and it's unclear to me why (could be my fault) and also unclear which set of instructions is the one that I should be doing---do I need the docker container if I install the CLI, which config files match with which components, etc.
Anyway, thank you Foren Power for the video link. I gave it a quick watch and it might be exactly what I'm looking for. I'm going to give the steps there a try ASAP and then come back here with specific errors if I still have problems.
Jared---I'm not sure what your dev processes are---would you consider accepting a pull request with updates/additions to the repo documentation if I can get this working? Maybe if I can add a few things that would have helped me out it could be useful to others in the community.
Thanks to you both.
Mislav Sagovac
I don't use Linux but I think the process is the same for all ops. And it is very easy with great mew lean CLI package. What I did is:
1) pull lean docker container,
2) install lean cli with pip install lean,
3) Init lean with lean init command,
4) Generate data or prepare your own data in data folder
5) write algo in any editor and execute it with lean backtest 'algonamehere'
More here:
https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cliBefore, I had to clone lean, build it etc, but above approach is much simpler. You need to clone lean only if you need to make changes to the lean source code. And even than you can use lean cli, that is lean build command.
Hope that helps.
Jasper van Merle
Hi Brian,
If you are still facing issues, can you please share the errors you are seeing? There is a lot of information in this discussion, but not enough to figure out exactly what you're trying to do and what's going wrong.
Brian G
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!