Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need more explicit instruction on installing the Protobuf and ONNX optimizer. #49

Open
leimao opened this issue Jul 15, 2021 · 0 comments

Comments

@leimao
Copy link

leimao commented Jul 15, 2021

Hi,

I tried installinig the Protobuf via both building from source and apt. When I tried to build ONNX optimizer from source, I got problems related to Protobuf. How do I specify Protobuf for installing ONNX optimizer? Thank you.

root@3235dac98ab6:/mnt# pip install -e .
Obtaining file:///mnt
Requirement already satisfied: onnx in /tmp/onnx (from onnxoptimizer==0.2.6) (1.9.0)
Requirement already satisfied: protobuf in /usr/local/lib/python3.8/dist-packages (from onnx->onnxoptimizer==0.2.6) (3.17.3)
Requirement already satisfied: numpy>=1.16.6 in /usr/local/lib/python3.8/dist-packages (from onnx->onnxoptimizer==0.2.6) (1.21.0)
Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from onnx->onnxoptimizer==0.2.6) (1.16.0)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /usr/local/lib/python3.8/dist-packages (from onnx->onnxoptimizer==0.2.6) (3.10.0.0)
Installing collected packages: onnxoptimizer
  Running setup.py develop for onnxoptimizer
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/setup.py'"'"'; __file__='"'"'/mnt/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /mnt/
    Complete output (105 lines):
    running develop
    running build_py
    running create_version
    running cmake_build
    CMake Error at /usr/share/cmake-3.16/Modules/FindProtobuf.cmake:469 (file):
      file STRINGS file "/opt/conda/include/google/protobuf/stubs/common.h"
      cannot be read.
    Call Stack (most recent call first):
      third_party/onnx/CMakeLists.txt:172 (find_package)
    
    
    CMake Error at /usr/share/cmake-3.16/Modules/FindProtobuf.cmake:475 (math):
      math cannot parse the expression: " / 1000000": syntax error, unexpected
      exp_DIVIDE (2).
    Call Stack (most recent call first):
      third_party/onnx/CMakeLists.txt:172 (find_package)
    
    
    CMake Error at /usr/share/cmake-3.16/Modules/FindProtobuf.cmake:476 (math):
      math cannot parse the expression: " / 1000 % 1000": syntax error,
      unexpected exp_DIVIDE (2).
    Call Stack (most recent call first):
      third_party/onnx/CMakeLists.txt:172 (find_package)
    
    
    CMake Error at /usr/share/cmake-3.16/Modules/FindProtobuf.cmake:477 (math):
      math cannot parse the expression: " % 1000": syntax error, unexpected
      exp_MOD (2).
    Call Stack (most recent call first):
      third_party/onnx/CMakeLists.txt:172 (find_package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant