Answer the question
In order to leave comments, you need to log in
Why does VSCode itself include a virtual environment when debugging Python code?
Situation.
I write code in 1 .py file. Under the folder directory "above" there is a folder with a virtual environment, but python itself is in a completely different folder.
VSCode for working with virtual environments, and I didn’t set up much with python itself, I just installed the Python plugin from Microsoft.
Problem:
When I try to execute a file in the console, I get errors that such and such modules are not found -> for some reason it looks for them in the virtual environment folder, and not in the python folder.
The problem is solved by moving the .py file to one level with the virtual environment folder or to levels higher, but still this is a crutch, I would like to know the normal solution to the problem.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question