After installing lean I ran “lean init” and got the following:
C:\Lean>lean init
Traceback (most recent call last):
File "c:\users\david\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\david\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\david\anaconda3\Scripts\lean.exe\__main__.py", line 4, in <module>
File "c:\users\david\anaconda3\lib\site-packages\lean\main.py", line 95, in <module>
from lean.commands import lean
File "c:\users\david\anaconda3\lib\site-packages\lean\commands\__init__.py", line 17, in <module>
from lean.commands.backtest import backtest
File "c:\users\david\anaconda3\lib\site-packages\lean\commands\backtest.py", line 22, in <module>
from lean.click import LeanCommand, PathParameter
File "c:\users\david\anaconda3\lib\site-packages\lean\click.py", line 25, in <module>
from lean.container import container
File "c:\users\david\anaconda3\lib\site-packages\lean\container.py", line 14, in <module>
from dependency_injector.containers import DeclarativeContainer
ModuleNotFoundError: No module named 'dependency_injector.containers'
C:\Lean>
What's wrong and what do I have to do to get this to work?
thanks - dave
David Thielen
I fixed it. I uninstalled Anaconda, then installed Python, and it then worked.
David Thielen
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!