-1

When I turned on VSCode today I checked the Python version I was running and it told me 2.7. It was suppose to be 3.7. I checked to see if I was in a virtual environment and I wasn't. I checked my terminal and on my Mac and it said 3.7. So I don't know what is going on. I spent a few hours trying to fix it and got no success.

Also, I spent all day playing around it my computer to fix it and I don't know how, but now my Mac is running 2.7. I also downloaded 3.9 to see if that will fix it but it is still running 2.7. What should I do?

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • 1
    Any thing wrong with your PATH variable? – Aryan Jan 31 '21 at 05:27
  • Does this answer your question? [How to run multiple Python versions on Windows](https://stackoverflow.com/questions/4583367/how-to-run-multiple-python-versions-on-windows) – Aryan Jan 31 '21 at 05:29
  • Your example doesn't provide a MRE- https://stackoverflow.com/help/minimal-reproducible-example – Aryan Jan 31 '21 at 05:31
  • @treeson -How are things going? Just checking in to see if the information provided was helpful. – Jill Cheng Feb 24 '21 at 08:53

1 Answers1

0

In VS Code, we need to select a Python environment in VS Code, it will be displayed in the lower left corner of VS Code, and then, when we open the VS Code terminal(Shortcut key: Ctrl+Shift+`), it will automatically enter this python environment:

enter image description here

When we do not select the python environment, the VS Code terminal will use the first python in the python environment variable by default:

enter image description here

Jill Cheng
  • 9,179
  • 1
  • 20
  • 25