gpuopenanalytics / pynvml

Provide Python access to the NVML library for GPU diagnostics
BSD 3-Clause "New" or "Revised" License
205 stars 31 forks source link

AttributeError: module 'pynvml' has no attribute '_nvmlGetFunctionPointer' #47

Open Leon1207 opened 1 year ago

Leon1207 commented 1 year ago

Is this error occurred due to the compatibility between pynvml and driver version? My driver version is 450.80.02.

wookayin commented 1 year ago

Don't use this (which is unofficial), but use the official pynvml bindings.

pip uninstall pynvml
pip install -I nvidia-ml-py

See https://github.com/wookayin/gpustat/issues/153

Leon1207 commented 1 year ago

Thanks for reply!

wookayin commented 1 year ago

FYI the error is because this (duplicate) package doesn't expose non-public symbols to the pynvml namespace:

https://github.com/gpuopenanalytics/pynvml/blob/master/pynvml/__init__.py#L1

Leon1207 commented 1 year ago

Maybe, only use pip uninstall pynvml also works for me. Sincerely thanks!