I am doing the Tutorial of Django on Youtube, which can be found on the following URL: https://www.youtube.com/watch?v=rHux0gMZ3Eg
After creating a virtual environment and starting a project in Virtual Studio Code, he tries to add the python path into the VSCode.
In the video he is then able to use Python from the terminal inside the VSCode.
However, around minute 19 you can find that in the video. If I do it by myself, nothing is happening and I am also not able to use Python on the VSCode then. I did not figure out, what I am doing wrong, since I am exactly doing it like in the video.
Does anyone have an idea, what I am doing wrong here?
After you added
C:\Users\User\.virtualenvs\storefront-XXXX\Scripts\python.exe in the Command palette you have switched the python interpreter. You can find it out from the bottom-right on the VSCode, looks like this:
But it will not work in the older terminal which opened before switching the python interpreter. You need to create a new terminal(shortcut: Ctrl+Shift+`). That’s why after you restart it will work.
Answered By – Steven-MSFT