Back

Got an error msg when running python on desktop

 

 

 

 

 

Here is the debug msg:

2018-10-29T17:55:59.5097221Z Error Algorithm.Initialize() Error: During the algorithm initialization, the following exception has occurred: Loader.TryCreatePythonAlgorithm(): Unable to import python module ../../../Algorithm.Python/BasicTemplateFrameworkAlgorithm.py. Unable to load DLL 'python3.6m': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Stack Trace: QuantConnect.Lean.Engine.Setup.AlgorithmSetupException: During the algorithm initialization, the following exception has occurred: Loader.TryCreatePythonAlgorithm(): Unable to import python module ../../../Algorithm.Python/BasicTemplateFrameworkAlgorithm.py. Unable to load DLL 'python3.6m': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler.CreateAlgorithmInstance(AlgorithmNodePacket algorithmNodePacket, String assemblyPath) in C:\QC\Lean-master\Engine\Setup\ConsoleSetupHandler.cs:line 94
   at QuantConnect.Lean.Engine.Engine.Run(AlgorithmNodePacket job, AlgorithmManager manager, String assemblyPath) in C:\QC\Lean-master\Engine\Engine.cs:line 115
 QuantConnect.Lean.Engine.Setup.AlgorithmSetupException: During the algorithm initialization, the following exception has occurred: Loader.TryCreatePythonAlgorithm(): Unable to import python module ../../../Algorithm.Python/BasicTemplateFrameworkAlgorithm.py. Unable to load DLL 'python3.6m': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler.CreateAlgorithmInstance(AlgorithmNodePacket algorithmNodePacket, String assemblyPath) in C:\QC\Lean-master\Engine\Setup\ConsoleSetupHandler.cs:line 94
   at QuantConnect.Lean.Engine.Engine.Run(AlgorithmNodePacket job, AlgorithmManager manager, String assemblyPath) in C:\QC\Lean-master\Engine\Engine.cs:line 115

 

However, I do have python 3.6.5 installed on my machine:

An idea what might went wrong?

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.


Did you figure this out? Also running into a similiar issue.  I tried upgrading to python 3.6.6, re-running setup.py and rebuilding, but no help.

0

After a bunch googling, trying to understand the situation, I found that python3.6m.dll is simply the python dll, with a python-optimized malloc(). I'm still not sure how I was supposed to get the library (is it supposed to come with the python dist or do I build it?). However, I think that I have found a solution (lightly tested). I simply copied python36.dll to python3.6m.dll. Now it runs and the BasicTemplateFrameworkAlgorithm gives the same result as the C# version.

- Using a link would probably work, I did not try; I just copied

- There may be a performance penalty because you the malloc() function is not optimized for Python access patterns. But at least it works (so far)

0

Thanks, GregasMaximus.
Here is the link to the thread with your solution: Running local python algorithm error #4252.

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.


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