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

Using pynrfjprog has error "Could not find module highlevelnrfjprog.dll" when running on Windows 10

I have a Python script that I am wanting to use to flash our devices at manufacturing that uses pynrfjprog.

When running the script on Windows I get this error:

"FileNotFoundError: Could not find module 'C:\Users\devin\AppData\Local\Programs\Python\Python38\lib\site-packages\pynrfjprog\lib_x64\highlevelnrfjprog.dll' (or one of its dependencies). Try using the full path with constructor syntax."

I have verified that highlevelnrfjprog.dll IS at that location, so I am assuming "one of its dependencies" is also not installed.

 

I have installed the nRF Command Line Tools for 64-bit Windows, and when I run "nrfjprog" in a PowerShell, nothing happens, and if I run "nrfjprog" in a Command Prompt I get the error "The code execution cannot proceed because MSVCP140.dll was not found.  Reinstalling the program may fix this problem".


Is that error somehow related and what can I do to resolve it?


Thank you!

Related