This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfutil ModuleNotFoundError: No module named 'constants'


I have installed nrfutil on my Windows 10 computer and get the following error when running it:

C:\Users\00315055>nrfutil --help
Traceback (most recent call last):
File "c:\python37\lib\", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python37\lib\", line 85, in _run_code
exec(code, run_globals)
File "C:\Python37\Scripts\nrfutil.exe\", line 5, in <module>
File "c:\python37\lib\site-packages\nordicsemi\", line 53, in <module>
from nordicsemi.dfu.dfu_transport_serial import DfuTransportSerial
File "c:\python37\lib\site-packages\nordicsemi\dfu\", line 52, in <module>
from nordicsemi.lister.device_lister import DeviceLister
File "c:\python37\lib\site-packages\nordicsemi\lister\", line 39, in <module>
from import Win32Lister
File "c:\python37\lib\site-packages\nordicsemi\lister\windows\", line 43, in <module>
ModuleNotFoundError: No module named 'constants'

I have the following Python version:

C:\Users\00315055>python --version
Python 3.7.4

BR / Björn

Parents Reply
  • Hi A Wagner,

    Today I installed Python and nrfutil on a new computer. I installed Python 3.9.1 and then nrfutil through pip. I had the same issue as originally reported here, so it seems nrfutil does not work with Python 3.9.x. I downgraded Python to 3.7 and then nrfutil worked again.

    Nordic should fix this issue, very irritating when you download something from scratch that crashes first thing :-(

    BR / Björn