Python Forum

Full Version: print CPU temperature
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello please can someone help me with example of code that prints out CPU temperature ?

Thank you a lot.
Hello thank you for reply. I cant istall this. Iam getting error in CMD.

C:\Users\Samuel>pip3 install pyspectator
Collecting pyspectator
  Using cached pyspectator-1.2.1.tar.gz (12 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\samuel\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-install-vaq4zs9d\\pyspectator\\setup.py'"'"'; __file__='"'"'C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-install-vaq4zs9d\\pyspectator\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Samuel\AppData\Local\Temp\pip-install-vaq4zs9d\pyspectator\pip-egg-info'
         cwd: C:\Users\Samuel\AppData\Local\Temp\pip-install-vaq4zs9d\pyspectator\
    Complete output (1 lines):
    error in pyspectator setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'-r base.'"
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
You should consider upgrading via the 'c:\users\samuel\appdata\local\programs\python\python38-32\python.exe -m pip install --upgrade pip' command.
update pip
Also last commit was on Dec 26, 2017
I tested it in Linux, it works.

from pyspectator.processor import Cpu

cpu = Cpu(monitoring_latency=1)
print(f'Temp: {cpu.temperature} °C')
Hello guys i just can not install this extension. Iam always getting error like this in my CMD.


C:\Users\Samuel>pip install pyspectator
Collecting pyspectator
Using cached pyspectator-1.2.1.tar.gz (12 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\samuel\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-install-kdmiqrqc\\pyspectator\\setup.py'"'"'; __file__='"'"'C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-install-kdmiqrqc\\pyspectator\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Samuel\AppData\Local\Temp\pip-pip-egg-info-ykshe6qi'
cwd: C:\Users\Samuel\AppData\Local\Temp\pip-install-kdmiqrqc\pyspectator\
Complete output (1 lines):
error in pyspectator setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'-r base.'"
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

C:\Users\Samuel>
better use a Windows commandline tool with Popen
Iam sorry but iam not able to install this extension. I have installed over 100 python extensions but this one just not woring.
There is a issue report try follow the last post.
Pages: 1 2