Reputation: 1701
I've gone through the steps to get started with Lego EV3 and python described here: https://education.lego.com/en-us/support/mindstorms-ev3/python-for-ev3 however visual studio code isn't giving me any intellisense into pybricks.
In order to get anything up and running I'm having to constantly reference the pdf documentation. While that isn't an issue for me personally (2 monitors), it will be come this September when I'm trying to teach a class of 4-6 grade kids how to code on small laptops.
The root of the issue is that deploying the application involves copying all the files onto the robot where pybricks is present and all the imports actually work. However locally in VSCode none of the imports work properly so there's no autocomplete magic.
Anyone know the best solution for getting autocomplete/intellisense up and working?
Upvotes: 0
Views: 2141
Reputation: 370
As of 2019, simply installing pybrick stubs did the job for me:
$ pip install pybrick-stubs
Upvotes: 0
Reputation: 186
You have to install python-ev3dev2 package. You can check the description at the end of this page: https://github.com/ev3dev/vscode-hello-python
Upvotes: 1
Reputation: 16080
You will either need the source code or you could write .pyi
files -- which are basically just typed stub files -- to provide the typing information.
Upvotes: 1