LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
I am having some trouble getting Lean to run correctly on Mac using Python. The C# version works correctly and runs without issue. However when I follow the instructions to use python in the Algorithm.Python project get the following error when running Lean (command line or direct in VS):
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.
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.
Jakob P.
19
,
Have the same problem, has anyone a solution?
macOS High Sierra 10.13.6
conda 4.6.4 with Python 3.6.6
Â
Â
0
Edited by Jakob P.
Alexandre Catarino
,
Hi ScottB and Jakob, Are you running the latest Lean? About one month ago, we have added a patch that should handle issues with macOS running Python algorithms in Lean. I have tried and could install a clean version of Lean without a problem.
Is it the only python installation in your PC? Â
0
Jakob P.
19
,
Hi Alexandre,
I did a clean install of MacOs
installed VS for Mac
installed R from readme link
installed Anaconda from readme link
installed via conda Python==3.6.6, Pandas and Dependencies
when I open the project the Nuget Packages are restored. When building and running Lean in CSharp it works and displays all the sample output. If i select Python i get the same error ScottB posted.  Â
0
Alexandre Catarino
,
Hi Jakob P., sorry for the wait.
Could you please contact me in quantconnect/slack? Perhaps it is an edge case and we will need to collect more information to improve the guide.
Best regards, Alex Â
0
Makoto Watanabe
9
,
Hi,
I'm suffering from the same error.
Could you kindly let me know how to resolve this issue?
0
Link Liang
6.1k
,
Hi Makoto,
We are sorry to hear that. Could you please provide more information about the version of your MacOS, visual studio, python and Lean? Have you installed more than one version of python? We need your help to improve our service!
0
Andrew Schwartz
64
,
Hello,
I'm experiencing this issue trying to get pythn setup. C# works fine.
I'm installing python with pyenv (3.6.8) and then install anaconda. Anaconda seems to install 3.8 - as a solution I'm creating an environment with python 3.6.8 named Lean. The path would be as follows: {/Users/Username/opt/anaconda3/envs/Lean/lib/libpython3.6m.dylib}. After creating the environment I'm activating it in the terminal and running `pip install pandas`. Then I'm adding this line to the Python.Runtime.dll.config file:
  <dllmap dll="python3.6m" target="{/Users/andrew/opt/anaconda3/envs/Lean/lib/libpython3.6m.dylib}" os="!windows"/>
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.
Loading...
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!