Hello,
I'm working on getting Lean set up to run in visual studio. I've been following the guide on github, and I am stuck at the Running Lean in the Container part. I've updated the config file to use python.
https://github.com/QuantConnect/Lean/blob/master/.vs/readme.mdWhen I go to the Lean folder in the terminal then type ./run_docker.bat debugging=yes I get the following;
./run_docker.bat: line 1: @echo: command not found
./run_docker.bat: line 3: REM: command not found
./run_docker.bat: line 4: REM: command not found
./run_docker.bat: line 5: REM: command not found
./run_docker.bat: line 6: syntax error near unexpected token `('
./run_docker.bat: line 6: `REM Licensed under the Apache License, Version 2.0 (the "License");'
Any idea what these errors mean?
Derek Melchin
Hi Michael,
Please provide us with more information so we can reproduce this issue. For example, which OS are you using? Are you using command prompt or PowerShell?
Best,
Derek Melchin
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.
Fireball
Hi Derek,
Thanks for the questions. I'm using macOS. I just downloaded PowerShell after reading this. Now after typing .\run_docker.sh in Powershell. VS will open the run_docker.sh file, but no promts come up to hit enter? Another thing I noticed is in VS next to QuantConnect.Algorithm.Python there is a blue circle with an i. When I hover over the i a pop up box says "Project not built in active configuration". I do want to use Python. Let me know if there is any other information I can provide to help. First goal is just to run the BasicTemplateAlgorithm and get non-zero results.
Regards,
Michael
Alexandre Catarino
Hi Michael Marin ,
Since you are working on macOS, you should use macOS Terminal to execute run_docker.sh. It was not clear that you had an iMac, because you have mentioned run_docker.bat which is for Windows.
We don't need to build QuantConnect.Python to run algorithms written in Python. Before you try to run Python algorithms, please try to run C# version of BasicTemplateAlgorithm that should be possible without any change in config.json or run_docker.sh.
Derek Melchin
Hi Michael,
The error "realpath: command not found" suggests the GNU coreutils needs to be updated/installed. Refer to this GitHub thread.
The config file location is determined from the result of the realpath function. Resolving the function error should fix the problem. See the source code for reference.
Best,
Derek Melchin
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.
Fireball
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!