Hi guys,
I am trying to learn LEAN, play it locally. However it gives an error regarding the python-in-net setup. (when launching with CSharp settings, script works perfectly) In the documentation there isn't really information about how to deal with this. What's the default way of dealing with it? Thanks!!
Mia Alissi
Based on the information provided in the extracts, it seems like you're having trouble setting up Python with LEAN. Here are some steps you can follow to troubleshoot the issue:
Ensure you have installed the correct version of Python. As of May 2020, QuantConnect supports Python 3.6 and is not compatible with Python 3.7 or later. You can install a specific version of Python with Anaconda using the command
conda install -y python=3.6.6
(source).Make sure you have installed and configured Microsoft Visual Studio for use with both C# and Python (source).
If you're using Windows, you might need to install .NET Framework 3.5 (includes .NET 2.0 and 3.0) as suggested in this forum post.
If you're using Linux, you might need to install pythonnet. You can do this by following the instructions on Pythonnet's wiki: https://github.com/pythonnet/pythonnet/wiki/Installation (source).
If you're still having trouble, you might need to update the QuantConnect.pythonnet Nuget package from 1.0.4.4 to 1.0.5.1 (source).
Remember to run the commands one at a time in the Python interpreter to verify success. If you're still having trouble, please provide more details about the error you're encountering.
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.
Matas Urbonavicius
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!