I need to get the amount of physical CPU cores with Python.
My CPU has 4 cores and 8 threads. I know a couple of functions like os.cpu_count
and multiprocessing.cpu_count
, but they return 8 which is the amount of threads, not cores. How can I get the amount of cores, not threads? Is there any function in Python for that?