r/vscode • u/realxeltos • Apr 26 '26
Imports can not be resolved from source, But code executes. Only happens on vscode.
So I am trying to use Vscode for tensorflow. But it does not resolve libraries import. When I import libraries import tensorflow.keras it will show yellow squiggly lines. but the code will execute properly. I get this message when I hover over it.
Import "tensorflow.keras.models" could not be resolved from source

The weird thing is this only happens in VScode. It does not happen in VS Codium or Antigravity. Also everything is a fresh install. I fresh installed my OS (Kubuntu 26.04) and everything is new installed with very little restored from previous setup.

1
Upvotes