I'm trying to run Python in Sublime but I get a syntax error because it's running Python 2.7.
I tried to create a new build with
{
"cmd": ["/usr/bin/python3", "-u", "$file"],
"file_regex": "^ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
but that isn't working either. I made a new Python file with
import sys
print("Sublime is using: ", sys.version)
and I get
('Sublime is using: ', '2.7.16 (default, Oct 16 2019, 00:35:27) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]')
I ran whereis python3
in the terminal and nothing returned. When I did whereis python
I got usr/bin/python
. When I did which python 3
, I got /usr/bin/python
.
I have no idea what to do to fix this.