onnx-modifier icon indicating copy to clipboard operation
onnx-modifier copied to clipboard

Installation error : "Protobuf compiler not found"

Open xurei opened this issue 10 months ago • 3 comments

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 avatar Feb 04 '25 15:02 xurei

@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?

ZhangGe6 avatar Feb 05 '25 14:02 ZhangGe6

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.

xurei avatar Feb 11 '25 21:02 xurei

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.

rwfsmith avatar Apr 06 '25 07:04 rwfsmith