Hi there,
I'm encountering an issue while trying to flash a PWM example built with NCS v2.9.0 on Windows 11 (using Python 3.10). The build completes successfully and generates the merged.hex
file, but flashing fails with a Python DLL conflict error. Here's the relevant output:
-- west flash: using runner nrfutil
-- runners.nrfutil: Flashing file: merged.hex
Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "runpy.py", line 86, in _run_code
exec(code, run_globals)
File "nrfutil.exe\__main__.py", line 4, in <module>
File "site-packages\nordicsemi\__main__.py", line 43, in <module>
import click
File "site-packages\click\__init__.py", line 7, in <module>
from .core import Argument as Argument
File "site-packages\click\core.py", line 16, in <module>
from . import types
File "site-packages\click\types.py", line 8, in <module>
from ._compat import _get_argv_encoding
File "site-packages\click\_compat.py", line 518, in <module>
from ._winconsole import _get_windows_console_stream
File "site-packages\click\_winconsole.py", line 13, in <module>
from ctypes import byref
File "ctypes\__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ImportError: Module use of python312.dll conflicts with this version of Python.
What I've tried so far:
- Reinstalled the toolchain, SDK, VS Code extensions, and VS Code itself.
- Installed and uninstalled Python 3.12.
- Used the nRF Connect Desktop Programmer, which successfully flashed the board.
- Verified
nrfutil
version: 7.13.0
It seems that nrfutil
is attempting to use python312.dll, causing a conflict with my Python 3.10 setup.
Any suggestions on how to resolve this would be greatly appreciated!
Thanks!
Karim