Hello,
I’m working on an add-on in VScode, using a Blender VScode extension.
Pylance is showing import errors (reportMissingImports) on built-in modules:
As far as I understand, Blender executable contains a python interpreter, which has all these built-in modules loaded during blender build (or does it do it at runtime?), so this error is expected because the interpreter VScode uses won’t have these modules (the interpreter I’m using for VScode/Pylance is the one in the blender build files).
What’s the standard way to deal with this issue? When extending the python interpreter, blender’s just using compiled .o files of C modules, I presume. Can I just manually extend my own interpreter (the one VScode uses) using these files as well (by building blender and then saving these files, or are they already there in build_linux folder)? Or is there an easier/better way?
Any suggestion would be appreciated!