Hi,
Please bear with me as I'm new to both python and QC.
I'm trying to code in pycharm and I see QCAlgorithm and related QC types are unresolved and unrecognised.
I've downloaded LEAN zip file from github and I have added the following dir in pycharm File->Settings->Project Interpreter -> Interpreter Paths
Lean-master\packages\QuantConnect.pythonnet.1.0.5.30\lib\win
But that doesn't seem to make a difference.
Note that I have installed skylight and in pycharm I just want to code and be able to benefit from intellisense/AutoComplete locally.
I greatly appreciate your help!
Jambo dev
I must add that I have thses lines at the start of the file too:
Derek Melchin
Hi Jambo,
The clr AddReference just adds a reference to the C# binaries. The imports don't translate into python libraries that the autocomplete can use. We've been working on providing support for Python autocomplete locally, but it is not ready for release yet.
Best,
Derek Melchin
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.
Goofball
I am using pycharm and I also try to use the AddReference to run script locally. It gives me the error "ImportError: cannot import name 'AddReference' from 'clr'". Was there any progress made with the AddReference import in the meantime?
from clr import AddReference AddReference("System") AddReference("QuantConnect.Algorithm") AddReference("QuantConnect.Common")Derek Melchin
Hi Goofball,
I was unable to reproduce this import error. What is the version number of the clr package?
>Was there any progress made with the AddReference import in the meantime?
Yes, we've recently added support for python autocomplete with PyCharm.
Best,
Derek Melchin
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.
Goofball
I was able to get around the clr import issues with some reinstall of python and leveraging pythonnet. That resolved the clr import error.
Jambo dev
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!