VSCode Python Intellisense remove default modules/paths

59 views Asked by At

I'm working on a simple python project which will be uploaded to an external micro computer running python (the Lego spike prime in case you know it). Because I'm uploading to a limited python environment, the number of supported methods is actually pretty small.

However, while programming, the Intellisense popup always recommends a bunch of unnecessary modules and functions which I can't use anyway.

I'm trying to find a way to exclude said unnecessary modules from the Intellisense recommendations.

the recommendations I get

It seems like the problem is because Pylance is always importing the modules it came bundled with. I am unable to figure out how to prevent Pylance/Intellisense from indexing these files. path that is getting indexed

I tried adding them in settings.json to the "python.analysis.exclude", "files.watcherExclude" and "files.exclude" properties, and I also created a pyrightconfig.json file and excluded the paths in there, without effect. I also tried to exclude some paths from within my project, which also didnt work (they were still showing up as Intellisense recommendations). This might indicate that I am doing something wrong. added files

I also tried setting a virtual environment, but modules installed for the root user (like PIL) still get indexed.

I'd appreciate any help excluding the unnecessary recommendations. Thanks!

0

There are 0 answers