1

I'm importing debugpy into my code and it works, but VSCode complains that it cannot be imported:

enter image description here

The interpreter shows that I am in the same venv as my terminal:

enter image description here

In my terminal (in VSCode) I can list debugpy and import it at the Python prompt.

(python4uvm_examples) raysalemi@RayProMac python4uvm_examples % pip list | grep debugpy
debugpy           1.4.1
(python4uvm_examples) raysalemi@RayProMac python4uvm_examples % python
Python 3.8.5 (default, Sep  4 2020, 02:22:02) 
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import debugpy
>>> 

How do I get VSCode to see that it can be imported?

1 Answer 1

1

they have this bug for some time now. what I do - select another interpreter, then re-select the one I need. usually works. (using Pylance as language server).

Sign up to request clarification or add additional context in comments.

1 Comment

Aha! That's what happened. Yes it started working after I was poking around.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.