Why Is macOS Visual Studio Code Using Wrong Python Interpreter?

前端 未结 1 1930
孤城傲影
孤城傲影 2021-01-13 23:33

I\'m running VS Code 1.33.1 on macOS Sierra (10.12.6). When I run a simple Python program like the following, VS Code uses Python 2.7 as installed on my Mac rather than Pyt

相关标签:
1条回答
  • 2021-01-14 00:19

    It's because of the code runner extension. Add this "code-runner.executorMap.python": "python3 -u" to your settings.json and that should change the python version for when it runs code to python3 instead of python2

    0 讨论(0)
提交回复
热议问题