Skip to content

MSVCP140.dll runtime dependency is not provided on Windows #39

Description

@Skorodum

nrfjprog.dll has dependency on MSVCP140.dll which is not part of the package. On clean Win10 it gives the following error:

(venv) PS C:\Users\novelda> pip install pynrfjprog
....
(venv) PS C:\Users\novelda> pip show pynrfjprog
Name: pynrfjprog
Version: 10.24.0
...
(venv) PS C:\Users\novelda> python
...
>>> from pynrfjprog import LowLevel
>>> LowLevel.API()
Traceback (most recent call last):
  File "C:\Users\novelda\venv\lib\site-packages\pynrfjprog\LowLevel.py", line 132, in __init__
    self._lib = ctypes.cdll.LoadLibrary(nrfjprog_dll_path)
  File "C:\Users\novelda\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\novelda\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\novelda\venv\lib\site-packages\pynrfjprog\lib_x64\nrfjprog.dll' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\novelda\venv\lib\site-packages\pynrfjprog\LowLevel.py", line 134, in __init__
    raise RuntimeError(f"Could not load the NRFJPROG DLL: '{error}'.")
RuntimeError: Could not load the NRFJPROG DLL: 'Could not find module 'C:\Users\novelda\venv\lib\site-packages\pynrfjprog\lib_x64\nrfjprog.dll' (or one of its dependencies). Try using the full path with constructor syntax.'.

Dependency Walker:

Screenshot from 2024-02-02 13-52-29

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions