Has happened a couple of times on fresh installations of the toolchains, I am not able to build with NANOPB enabled due to the provided python executable not having the protobuf
or grpcio_tools
packages installed. Currently using Windows.
FAILED: src/modules/protos/data.pb.c src/modules/protos/data.pb.h cmd.exe /C "cd /D C:\_p\imove\firmware-zephyr\build && C:\Users\natty\scoop\shims\protoc.exe -IC:/_p/imove/firmware-zephyr/build/nanopb/generator -IC:/_p/imove/firmware-zephyr/build/nanopb/generator/proto -IC:/_p/imove/firmware-zephyr/build -IC:/_p/imove/firmware-zephyr -I. --plugin=protoc-gen-nanopb=C:/_p/imove/firmware-zephyr/build/nanopb/generator/protoc-gen-nanopb.bat "--nanopb_opt= -IC:/_p/imove/firmware-zephyr/src/modules/protos -IC:/_p/imove/firmware-zephyr" --nanopb_out=C:/_p/imove/firmware-zephyr/build C:/_p/imove/firmware-zephyr/src/modules/protos/data.proto" ************************************************************* *** Could not import the Google protobuf Python libraries *** *** Try installing package 'python3-protobuf' or similar. *** ************************************************************* Traceback (most recent call last): File "C:\_p\imove\firmware-zephyr\build\nanopb\generator\\nanopb_generator.py", line 36, in <module> import google.protobuf.text_format as text_format ModuleNotFoundError: No module named 'google' --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
I have to manually execute pip
for the packaged python version (not the system one) using c:\ncs\toolchains\v2.1.1\opt\bin\python.exe -m pip install protobuf grpcio_tools
Not sure if this is expected or not. Installing it to the system python version does not work either as the toolchain's python does not look here.
Just wanting to know if this a "bug" or if it's intended.
Thanks