Installation error : "Protobuf compiler not found"
There is a missing step in the install process in the README.
...
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.12.so (found version "3.12.7")
Generated: /tmp/pip-install-ona22hsx/onnx_89c6a67bcba64053a39666433b6cab5d/.setuptools-cmake-build/onnx/onnx-ml.proto
CMake Error at CMakeLists.txt:303 (message):
Protobuf compiler not found
Call Stack (most recent call first):
CMakeLists.txt:334 (relative_protobuf_generate_cpp)
...
To solve this, I used sudo apt install protobuf-compiler on Ubuntu 24.10.
Hope this will help someone until the README is fixed.
I still have issues installing it during the linking process of onnx. If I find the cause, I'll create another issue for this.
@xurei Are you trying to build wheel from the source code? I built on my Windows machine simply by "python -m build" and all things went well. Surprises can happen given to different platforms/environment setups.
Just curious, why not use the pre-built wheel from PyPI directly (by pip install onnx-modifier)? Is there any issue encountered?
I'm on Linux, and yes, The issue happened when I tried to install with pip install onnx-modifier.
I'm not very experienced with python, but AFAIK it is not able to install software globally (i.e. with apt). Apparently, ONNX depends on it, so it was failing.
I'm getting the same thing on Windows, so I did this:
pip install onnx pip install onnx_tool pip install flask
then it worked.