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.
which python 3? For me,whichignores the3and just prints the path to python2./Library/Frameworks/Python.framework/Versions/3.8/bin/python3. however, my issue remains with sublime/usr/bin/python3exist?whereis python3in terminal, nothing shows up and i'm not sure why or how to fix itwhere python3returns a path? Or does it return nothing?