Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import "boto3" could not be resolved/Python, VS Code

I am working on my python project, wherefor I need to import the package called "boto3". Therefore I get this error tooltip: "Import "boto3" could not be resolved". I tried out "pip install boto3" in the VS code terminal and reloaded the window but still the error tooltip does not go away :/

What am I doing wrong? Thanks in advance

like image 684
JohnnyWhatsUp Avatar asked Sep 11 '25 20:09

JohnnyWhatsUp


1 Answers

Check to ensure vs code is using the correct Python interpreter. You can do this by opening up the command palette (Ctrl+Shift+P), and search "Python: Select Interpreter". Here is a screenshot of what my visual studio code looks like when I go to select the Python interpreter I need at the time.

vscode python select interpreter

For more information, here is some useful documentation:

  • Getting Started Tutorial for Python in Visual Studio Code
  • Using Python Environments in Visual Studio Code
like image 104
GonzalezAndrew Avatar answered Sep 13 '25 11:09

GonzalezAndrew