0

tried adding it to code preference settings json as an executable path and it still defaulted to python 2.7 instead of 3.9.7 like i wanted it to. anyone know how to fix this im running visual studio code 2020 for mac

here is the path i added to the settings json "python.pythonpath": "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"

2 Answers2

0

What does the lower-left corner say your interpreter is set to? If that doesn't point to the interpreter you are expecting then click on it and change it.

I think your problem is related to this issue with the python extension in this stack overflow question

Updating visual studio code to the latest version might help.

Ian Andwati
  • 333
  • 2
  • 9
0

On the MacOs, you need to take python3 instead of python to run the python3 interpreter. And of course, you can rename the python executable of the python2 to something others such as python2 to avoid the problem.

Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13