problem building theh project. ModuleNotFoundError: No module named 'jinja2'

After yesterday update of some tools in pip3 and brew I lost a possibility to build any projects of our device firmware. Any previously working commits doesn't build now. I even made the same setup on my second macbook.

Install everything that is necessary to develop
Automatic installation + Manual installatioin according to this and this

Create a folder in ~ for our project, e.g. ~/biig-fw-ws

I do this:
west init -m github.com/.../biig-fw ~/biig-fw-ws
cd ~/biig-fw-ws
west update
west build -b bvmb_cpuapp_ns -- -DBOARD_ROOT=/Users/el314biig/biig-fw-ws/biig-fw/

And it says that I don't have jinja2. I have already checked it. It exists and work from python.

Traceback (most recent call last):
File "/Users/el314biig/biig-fw-ws/modules/tee/tf-m/trusted-firmware-m/tools/tfm_parse_manifest_list.py", line 14, in <module>
from jinja2 import Environment, BaseLoader, select_autoescape, TemplateNotFound
ModuleNotFoundError: No module named 'jinja2'
CMake Error at tools/CMakeLists.txt:161 (message):
File generation failed


-- Configuring incomplete, errors occurred!
See also "/Users/el314biig/biig-fw-ws/biig-fw/build/tfm/CMakeFiles/CMakeOutput.log".
See also "/Users/el314biig/biig-fw-ws/biig-fw/build/tfm/CMakeFiles/CMakeError.log".
[63/406] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
ninja: build stopped: subcommand failed.

I can share west -vvv log file as well.

Parents
  • Hi,

    Please open the terminal via the Toolchain manager app, then try to build the project again from that terminal to see if it works. The toolchain manager will set the system PATHs so that the python interpreter, CMake, + other build tools are picked up from the toolchain installation instead.

    Best regards,

    Vidar

  • Ok, Done as you said.
    New error:

    -- west build: generating a build system
    CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
    CMake 3.21 or higher is required. You are running version 3.20.5


    -- Configuring incomplete, errors occurred!
    See also "/Users/el314biig/biig-fw-ws/biig-fw/build/CMakeFiles/CMakeOutput.log".
    See also "/Users/el314biig/biig-fw-ws/biig-fw/build/CMakeFiles/CMakeError.log".
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.1.2/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/v2.1.2/bin/python3 -B/Users/el314biig/biig-fw-ws/biig-fw/build -GNinja -DBOARD_ROOT=/Users/el314biig/biig-fw-ws/biig-fw/ -S/Users/el314biig/biig-fw-ws/biig-fw

    Our FW is based on the SDK 2.1.2 So I run from it. Same error btw if I'm running it from the terminal from SDK 2.2.0

Reply
  • Ok, Done as you said.
    New error:

    -- west build: generating a build system
    CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
    CMake 3.21 or higher is required. You are running version 3.20.5


    -- Configuring incomplete, errors occurred!
    See also "/Users/el314biig/biig-fw-ws/biig-fw/build/CMakeFiles/CMakeOutput.log".
    See also "/Users/el314biig/biig-fw-ws/biig-fw/build/CMakeFiles/CMakeError.log".
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.1.2/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/v2.1.2/bin/python3 -B/Users/el314biig/biig-fw-ws/biig-fw/build -GNinja -DBOARD_ROOT=/Users/el314biig/biig-fw-ws/biig-fw/ -S/Users/el314biig/biig-fw-ws/biig-fw

    Our FW is based on the SDK 2.1.2 So I run from it. Same error btw if I'm running it from the terminal from SDK 2.2.0

Children
Related