How to make VS Code accept your local imports
- Open User settings
- Search for “python path”
- Click “Edit in settings.json” under “Auto complete: extra paths”
- Add to the array
python.autoComplete.extraPaths
for example:
"~/learning-ros2/install/my_robot_interfaces/lib/python3.8/site-packages/my_robot_interfaces"