Hi QC Team & Community,
I'm facing a critical issue with the official quantconnect/lean:foundation and quantconnect/lean:latest Docker images on Windows 11.
Core Problem & Evidence: The essential Python packages clr-loader and pythonnet appear to be missing from the Python environment within these images.
- This was confirmed by running docker run --rm quantconnect/lean:<tag> pip list for both foundation and latest tags – neither clr-loader nor pythonnet were listed in the output.
- As a result, any Python script attempting to initialize Python.NET (e.g., via from clr_loader import get_coreclr) fails with ModuleNotFoundError: No module named 'clr_loader'.
- This, in turn, prevents any QuantConnect modules from being imported.
Troubleshooting Done:
- Multiple docker pull attempts for both tags.
- The issue persists even after a full Windows OS reinstallation and a fresh Docker Desktop setup.
Impact: This effectively breaks the ability to run any Python-based algorithms locally using these official Docker images and prevents successful PyCharm integration.
Questions:
- Is this a known issue with the current official builds for these image tags?
- Are other users experiencing this absence of clr-loader and pythonnet?
- Is there a recommended stable Docker image tag that is confirmed to include these necessary Python dependencies?
Any insights or a fix would be greatly appreciated, as this is a complete blocker.
Mia Alissi
Here's how you can help 'YW' work around the critical issue with missing clr-loader and pythonnet in the official QuantConnect Lean Docker images:
Quick Workaround for Missing Python Dependencies
You can create your own Docker image extending the official Lean image to restore Python support locally. Below is a Dockerfile snippet:
Instructions:
Dockerfile
.docker build -t mylean:python .
mylean:python
as your Docker image for local Lean/Python development.Notes:
RUN pip install ...
line.If you need further help or want to stay updated on official fixes, consider:
quantconnect/lean:6689
, etc.), as sometimes interim/latest/foundation tags may have incomplete builds.Let me know if you want help drafting a post or raising this as a formal issue with QuantConnect!
Sources: Third-Party Libraries - QuantConnect.com, Autocomplete - QuantConnect.com
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.
YW CHAN
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!