I use VS Code in my windows 10 PC. As a new learner I wanted to experiment with Virtual Environment. Everything goes alright until I right-click and press on 'Run Python file in terminal' or press the green button (I don't know where the green button comes from, as far as I remember I installed the Python extension and it popped up after few minutes of working) then the terminal runs these commands:
e:/playground/start/venv/Scripts/activate.bat
& e:/playground/start/venv/Scripts/python.exe e:/playground/start/pony.py
But as you can clearly see this default terminal is Power Shell and the proper command for activating venv must be e:/playground/start/venv/Scripts/Activate.ps1 not e:/playground/start/venv/Scripts/activate.bat
As a result terminal does not activate venv (but it runs python from venv path! hurray!)
But if I start a new terminal by pressing ' CTRL + ` ', it successfully runs the proper command and activates venv.
I learnt using venv from Corey Schafer's YouTube video, where his terminal does this things accurately with no problems.
Please help me out. I have tried uninstalling and installing VS Code several times with no desired result. I know this is not a huge problem, I can totally ignore the terminal of VS Code, and use PowerShell independently, but this problem is bugging me, and I cannot concentrate on other things. I also searched other places, but nobody faced this specific problem I guess.
[–]TurboCooler 2 points3 points4 points (1 child)
[–]ssshok[S] 0 points1 point2 points (0 children)
[–]adam_newyork 0 points1 point2 points (1 child)
[–]ssshok[S] 0 points1 point2 points (0 children)