0

i just installed python 3.10 on my computer (with Ubuntu OS) but when i do the $ python --version commend of my vscode shell it says that i am in 2.7.17, is there a commend to change it to 3.10 ?

vs code clearly says that my code is running in 3.10 as you can see , i don't understand

  • possibly related [link](https://stackoverflow.com/questions/48135624/how-can-i-change-the-python-version-in-visual-studio-code) – YoshiMbele Jun 03 '22 at 09:44
  • i tried the solution, it change the interpreter for the code, but not for the terminal @YoshiMbele – Armand Marcelli Jun 03 '22 at 09:47
  • Your PATH contains a directory which has an executable for Python 2.7. Do a `type -a python` before invoking `python` to learn more about it. – user1934428 Jun 03 '22 at 12:01

2 Answers2

2

On ubuntu, python sometimes defaults to the 2.x version, while you have to explicitly write python3 to use the 3.x version

vultkayn
  • 189
  • 1
  • 8
1

You could use Python IDE like Pycharm so it would be easier to specify python version to use project by project

  • I really like vs code and i dont want to use any other version than 3.10, i just want to have a 3.10 teminal, why is this so difficult ? – Armand Marcelli Jun 03 '22 at 10:06