Sublime Forum

Mac OS which python to use?

#1

Trying to figure out how to switch the python sublime text uses. I had this previously setup but got a new computer.
I usually install homebrew python2 and python3 and sometimes anaconda3’s python3.
Not sure if it matters a lot, but the last couple of days I got a bunch of hangs inside of sublime and had to force quit it.
Thanks
Andy

0 Likes

#2

Sublime does not need not use any version of Python that you might have installed on your computer except for building external Python programs as mentioned below. As such you can have as many or as few (including none) versions of Python installed on your computer and it has no effect on anything.

If you mean the version of Python that gets used to run your external Python programs as a result of using the bundled Python build system, it just tries to run python by default. In order to change it to another version you would need to modify the existing build file to run something else (e.g. python3) or duplicate it to another name and modify the duplicate.

You can use PackageResourceViewer to locate and view the Python\Python.sublime-build file in order to do this If you use that to open the file and then modify it, PRV will automatically create an override for you. Alternatively you could use Save As to give it a different file name.

0 Likes

#3

Cool ok. So the hangs were not related to a python setup problem I thought I had on the machine. This is a completely new box and I had not previously had any hangs with the recent version so I was blaming python. If I run into problems again I will try to get some more info.
Thanks
Andy

0 Likes