Sublime Forum

macOS pop-up message: Sublime Text needs to be updated (Python 2?)

#1

Starting about a week ago, whenever I open Sublime Text (either by clicking the icon, or running "open " from the terminal, I get the following pop-up message:

I’m on macOS 12.0.1 and Sublime Text 4121.

Clicking “Learn More…” brings me to the Python 2 deprecation page, so I assume that Python 2 must be in the path that Sublime is using to launch. Anyone else run into this?

0 Likes

#2

I’ve never seen anyone report that previously, no.

Although Sublime uses Python for plugins, it’s not Python 2 and it’s also an interpreter that’s embedded in the app itself and doesn’t rely on (and flat out ignores) any version of Python you may or may not have installed.

It’s curious that it happens on startup though. Does the same thing happen if you start Sublime in Safe Mode?

My guess would be that it’s flagging the fact that Sublime is launching Python 2 at startup. If that’s the case, then it would be related to a package or plugin you have installed that’s doing something at startup. In such a case, Safe Mode is the fastest way to verify if that’s the case or not.

0 Likes

#3

Yeah, same pop-up if I start in Safe Mode.

0 Likes

#4

According to https://youtrack.jetbrains.com/issue/IDEA-271050 this happens when the application triggers python 2 in some way. The likely culprit is your shell profile (ie. ~/.zprofile, ~/.bash_profile, etc.) running python 2, as we load the environment variables from the shell.

2 Likes

#5

I double-checked my environment variables, didn’t see anything specifically noting Python 2. However, I did see that there were some “unused” PyEnv environment variables being set in ~/.bash_profile. Once I deleted these references and restarted my computer, starting Sublime Text no longer displays that message. Why it only started happening in the last week or so is beyond me.

Anyways, problem solved, thanks for pointing me in the right direction!

0 Likes

#6

This issue came back again, not sure why. I ran the following, though, which appears to have addressed the problem (hopefully for good this time):

ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python

0 Likes