pythonversionenvironment

How to change python version


I have Python 3.11, and I want 3.8. I downloaded 3.8, and removed 3.11 from path. My command prompt says:

C:\Users\forha>python --version
Python 3.8.0

In VScode, my terminal says

C:\Users\forha\OneDrive\Documents\GitHub\F1car-wAI>python --version
Python 3.11.0

I've tried changing the python interpreter, but it still always says "Python 3.11.0" when I run

python --version

Thanks for the help!


Solution

  • Close the VSCode terminal and close and reopen VSCode. The terminal usually needs to be restarted after changing your PATH.