0

I occasionally get Python popping up and occupies all my CPU

python

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


Here is an update on December 9, 2020

I think the issue comes from a VS code extension called "Python", and you can check out the corresponding issue in its Github page.

7
  • I wonder what Python (with capital P) is.
    – lhf
    Aug 14, 2020 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, 2020 at 0:04
  • Have you tried killing it from Activity Monitor.
    – Natsfan
    Aug 14, 2020 at 0:58
  • @jmh I did, but it pops up from time to time, maybe once a month.
    – zyy
    Aug 14, 2020 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. Aug 15, 2020 at 2:41

1 Answer 1

2

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.

1
  • Great, I will try to investigate!
    – zyy
    Aug 15, 2020 at 4:02

You must log in to answer this question.

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