Back

Cannot build the Lean Solution on Visual Studio Community 2017 - The type or namespace name 'Python' and "PyObject" could not be found

Expected Behavior

I cannot build the Lean Solution on Visual Studio Community 2017

Actual Behavior

When building I have the following errors (123 of them) composed of :

  • CS0246 The type or namespace name 'PyObject' could not be found (are you missing a using directive or an assembly reference?
  • CS0246 The type or namespace name 'Python' could not be found (are you missing a using directive or an assembly reference?Algorithm
  • CS0006 Metadata file 'C:\Users\adrie\Lean\FILEPATH\NAME_OF_FILE(.dll or .exe)' could not be found

Potential Solution

Cannot find one

System Information

Windows 10;
Visual Studio Community 2017;
ASP.NET 3.5 and 4.7 activated in windows feature;
I followed the LEAN installation procedure and ran all the steps at

https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#quantconnect-python-algorithm-project
Update Backtest







Hi Adrien LQ , sorry about the incovenience. We have a pending pull request that will solve this issue.
Meanwhile, please move the the file:
Lean\packages\QuantConnect.pythonnet.1.0.5.8\build\Python.Runtime.win to
Lean\packages\QuantConnect.pythonnet.1.0.5.8\lib\Python.Runtime.dll
and rebuild the solution.

0

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.


Hello Alexandre.
Thx for the answer.
Yeepaaa !! It works.
I know it would have been something silly like this. It used to appear on the github info page before but i don't know why it was removed.
Thx anyway

0

Update Backtest





0

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...

This discussion is closed