I am trying to use the newer version of Python but when I type:
import sys
print sys.version_info
I get back:
s
Use Command+,
to open the Preferences, and then make sure the Languages of Python3 have this:
Right Run Command
BTW, use which python3
to make sure the path is /usr/local/bin/python3
instead of /usr/bin/python3
to ensure safety
For the latest vscode you need to go to settings (shift+command+p) and override python interpreter value.
Crate a python file and get current sysinfo
import sys
print(sys.version_info)
command+shift+p
openSettingsJson
python
attribute in the json objectpython3
Try changing Python's "run command" in the preferences to:
python3 $filename;
in new versions in setting.json file just add:
"code-runner.
*note that (")
it predicts its continue or you can press ctrl+space and select "code-runner. "code-runner.executorMap" it show all of run commands easyly change
"python": "python -u",
to
"python": "python3 -u",
to change your intellisense for error handling in python3: then press ctrl+shift+P select python:select interpreter and select python 3.x.x
CodeRunner->Preferences->Languages->Run Command
edit "python $filename" to "python3 $filename"