-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'psutil' has no attribute 'sensors_temperatures' #1271
Comments
Me too!!! Have you solved the problem? windows7 64bit python=3.5.4 64bit |
no |
If you read the doc you'll notice how that is Linux only for now. =) |
I have the same story! Python 3.7 |
i have same issue at Ubuntu
|
@alex37529, what version of |
I have version 5.5.0 and it is not working for me with Python 2.7.15 under Windows 7. Availability: Linux, FreeBSD |
sensors_temperatures() is currently not implemented on windows |
i'm on mac and have version 5.6.3 and have the same problem |
@lamoboos223, as per documentation, temperatures sensors are currently only available on Linux and FreeBSD platforms. |
psutil only has sensors_battery attribute but it's not contains sensors_temperatures() and sensors_fans() two cool features. I really need those two modules into my project. |
@Pushpajit, more details are needed. What operating system and what version of |
psutil.sensors_temperatures(fahrenheit=False) is currently available only for :: Linux, FreeBSD Also psutil.sensors_fans() is available only for Linux, macOS. the only thing u can do is put them in try catch so that you can continue further without termination of execution of code.
|
how is it possible to update the version of psutil on linux? |
in a terminal you can hit: "python3 -m pip install --upgrade psutil" |
I'm not sure if anyone's still following this issue.. but, is there any plans to gain temperature information for Windows in psutil? |
I can't do it because I have a virtualized Windows box (would need a real one). Last time I checked it seems this can be done via the WMI interface. So basically whoever wants to give it a try just make a PR for it. |
Thanks for the respons of @giampaolo. In my case, I was trying to expose this information ultimately in the Glances API; which depends on Psutil. |
@giampaolo, I think I have a solution to this, you can use WMI for this right? If we can use that, we might get the temperature in Windows 10. I checked the internet, and I found out that we need a dll file from an application called OpenHardwareMonitor |
We can't use external DLLs. My comment about WMI meant that the implementation should (probably) be done by using WMI interface in C. |
Oh ok, thank you for the information, Big fan of your work
…On Fri 2 Apr, 2021, 11:11 PM Giampaolo Rodola, ***@***.***> wrote:
We can't use external DLLs. My comment about WMI meant that the
implementation should be done by using WMI interface in C.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1271 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQQXRFEB6CLOODFOKOMCSJ3TGX6TLANCNFSM4E4QY2GA>
.
|
Thank you, I appreciate it. |
Is there a way to have a multi-platform solution for temperatures? Even if there's a solution for Windows, it still wouldn't work for Mac users. |
Same story here |
When fix this trouble? |
I would be very happy with a solution for Windows. |
+1 here |
How is this issue even closed as "completed"? It's still outstanding, as temp sensors are still only available on Linux and FreeBSD. At least a "won't fix" would give a proper indication on intentions. |
im not getting psutil.sensors_temperatures(fahrenheit=False) to work on lunix ubunut 20.04
|
I'll also having this problem. The PyPI page (https://pypi.org/project/psutil/#sensors) says it supports Windows, but I am getting the error. |
This should be reopened as a feature request, not closed as completed; that's very misleading. Even if you aren't going to be the one to implement it, someone else who does should still be associating it with an open issue, and having an open feature request will make it easier for people to understand why it's not working. Also, the PyPi page should be updated to indicate that the sensor functions are only supported on Linux and FreeBSD. There's no mention there of this limitation, while it does say that Windows is a supported platform, which again is misleading. I'm not super familiar with WMI, but I'll do some digging and see if I can come up with something for the Windows side. I do have a MacBook as well, and I'd previously done some stuff with temperatures in htop-osx. I'll see if I can dig that out and see if it provides any guidance. That was C rather than Python, but I know there are ways to leverage C code in Python if necessary. That said, I have an older Intel-based MacBook (which they don't make anymore), so I can't really speak to Apple Silicon. It's possible I could get it to work on a |
I just tried to use psutil, but psutil.sensors_temperatures() currently returns an error
Traceback (most recent call last): File "C:/Users/Owner/Desktop/test.py", line 2, in <module> print(psutil.sensors_temperatures()) AttributeError: module 'psutil' has no attribute 'sensors_temperatures'
Using Windows 10
The text was updated successfully, but these errors were encountered: