I occasionally get Python popping up and occupies all my CPU


I have no clue why this is happening, because I almost never run Python on my laptop.

  • I wonder what Python (with capital P) is. – lhf Aug 14 at 0:02
  • @lhf The output of which python is /usr/local/bin/python, and my version is Python 2.7.17. – zyy Aug 14 at 0:04
  • Have you tried killing it from Activity Monitor. – jmh Aug 14 at 0:58
  • @jmh I did, but it pops up from time to time, maybe once a month. – zyy Aug 14 at 3:07
  • 1
    If you go into Activity Monitor, then click on the Python executable, then press the (i), you get a tab which will let you see its Open Files and Ports. Check this to see if you can find the problematic application/script. – At0mic Aug 15 at 2:41

Python with a capital P is the launcher app, found at /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app

This is used when a python script uses MacOS GUI components, such as creating a window, dialog or file panel.

It's likely that some process is calling a python script to do something. What that is and why it's using so much CPU is unclear without more analysis. In Activity Monitor, you can see what files the process is using, which would be a place to start.

| improve this answer | |
  • Great, I will try to investigate! – zyy Aug 15 at 4:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .