I am working with virtual environments. The fact is that it is when installing the packages in said virtual environment, they are installed, the environment shows them, but visual code tells me that said package does not exist. Is there any way to avoid that?
As you can see in the image, I have the environment running, the decouple package installed, and I do receive the print of the package function, however visual code has it as an error, since "it does not exist".
What is this error due to?
The error it threw was the following:
Import "decouple" could not be resolved Pylance(reportMissingImports).
In the end the problem was as simple as changing the path that vsc was selecting as the interpreter.
With that it directly reads the environment, packages and everything.
EDIT: In the lower right area of the vsc screen, several pieces of information can be distinguished, among these is the type of language used (python appears) and to the right the version of python used, if you click there the window that appears above will open where it requests to select the interpreter, if the virtual environment was created correctly, the path where the creation of the virtual environment is located should appear (as selected in the image), with that it reads the path created by virtualenv, where it reads installed packages and only the environment starts.
PS: I leave the video that helped me.