This could be because you are not using the correct python interpreter for your venv.
To select the interpreter: "View" > "Command Palette" or (Ctrl+Shift+P) and search and select "Python: Select Interpreter".
Then enter the path to the correct Python interpreter in your venv.
Example: ./.venv/bin/python3