nRF Util v6.1.0

Installing from sources

Download the sources from GitHub to install nRF Util.

In addition to Python and pip, installing nRF Util from the sources requires the Python setuptools. To upgrade to the latest version, run the following command:
pip install -U setuptools
If you want to create an executable for nRF Util, install pyinstaller:
pip install pyinstaller

Complete the following steps to install nRF Util from the sources.

  1. Clone the nRF Util GitHub repository.
  2. Open a command prompt in the folder where you cloned the repository and run pip install -r requirements.txt to install all prerequisites.
  3. Set up nRF Util in one of the following ways:
    • Run nRF Util from the sources without installation:
      python nordicsemi/__main__.py
      The remainder of this document assumes that you have installed the tool and can call it with nrfutil. If you choose to run it without installation, always replace the nrfutil command with python nordicsemi/__main__.py and add the required command-line options.
    • Install the library to the local Python site-packages and script folder:
      python setup.py install
      
    • Generate a self-contained executable version of the utility:
      pyinstaller nrfutil.spec
      
      Note: Some anti-virus programs will stop pyinstaller from executing correctly when it modifies the executable file. In this case, configure your anti-virus program to ignore pyinstaller.
If you are running nRF Util on Windows, the runtime libraries targeted during the library build must be present when running code using the library. The following errors indicate that the runtime libraries are not available:
  • Missing MSVC*120.DLL or MSVC*140.DLL
  • RuntimeError: Could not load shared library <path>/pc_ble_driver_shared.dll : '[Error 193] %1 is not a valid Win32 application
In this case, install the Visual C++ redistributable packages for Visual Studio 2013 or Visual Studio 2015. Select the version that corresponds to the architecture of your Python installation (x86 or x64).