Skip to content

onnxruntime and onnx protobuf version confliction #12009

Closed
@tianleiwu

Description

@tianleiwu

Describe the bug

When I pip install onnxruntime, it will upgrade protobuf. I can see errors like onnx 1.12.0 requires protobuf<=3.20.1,>=3.12.2, but you have protobuf 4.21.2 which is incompatible.

I think it is better to set onnxruntime 1.12 requires protobuf<=3.20.1,>=3.12.2 as well.

Urgency
If there are particular important use cases blocked by this or strict project-related timelines, please share more information and dates. If there are no hard deadlines, please specify none.
none

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
  • ONNX Runtime installed from (source or binary): source
  • ONNX Runtime version:
  • Python version: 3.8
  • Visual Studio version (if applicable):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:

To Reproduce

  • Describe steps/code to reproduce the behavior.
  • Attach the ONNX model to the issue (where applicable) to expedite investigation.
$ pip install /data/git/onnxruntime/build/master/Release/dist/onnxruntime_gpu-1.12.0-cp38-cp38-linux_x86_64.whl --force-reinstall
Processing /data/git/onnxruntime/build/master/Release/dist/onnxruntime_gpu-1.12.0-cp38-cp38-linux_x86_64.whl
Collecting protobuf
  Downloading protobuf-4.21.2-cp37-abi3-manylinux2014_x86_64.whl (407 kB)
     |████████████████████████████████| 407 kB 12.1 MB/s
Collecting coloredlogs
  Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting sympy
  Using cached sympy-1.10.1-py3-none-any.whl (6.4 MB)
Collecting numpy>=1.22.4
  Downloading numpy-1.23.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
     |████████████████████████████████| 17.1 MB 123.3 MB/s
Collecting flatbuffers
  Using cached flatbuffers-2.0-py2.py3-none-any.whl (26 kB)
Collecting humanfriendly>=9.1
  Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.2.1-py3-none-any.whl (532 kB)
WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
Installing collected packages: pyparsing, mpmath, humanfriendly, sympy, protobuf, packaging, numpy, flatbuffers, coloredlogs, onnxruntime-gpu
  Attempting uninstall: pyparsing
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: pyparsing 3.0.9
    Uninstalling pyparsing-3.0.9:
      Successfully uninstalled pyparsing-3.0.9
  Attempting uninstall: mpmath
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: mpmath 1.2.1
    Uninstalling mpmath-1.2.1:
      Successfully uninstalled mpmath-1.2.1
  Attempting uninstall: humanfriendly
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: humanfriendly 10.0
    Uninstalling humanfriendly-10.0:
      Successfully uninstalled humanfriendly-10.0
  Attempting uninstall: sympy
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: sympy 1.10.1
    Uninstalling sympy-1.10.1:
      Successfully uninstalled sympy-1.10.1
  Attempting uninstall: protobuf
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: protobuf 3.19.0
    Uninstalling protobuf-3.19.0:
      Successfully uninstalled protobuf-3.19.0
  Attempting uninstall: packaging
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: packaging 21.3
    Uninstalling packaging-21.3:
      Successfully uninstalled packaging-21.3
  Attempting uninstall: numpy
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: numpy 1.23.0
    Uninstalling numpy-1.23.0:
      Successfully uninstalled numpy-1.23.0
  Attempting uninstall: flatbuffers
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: flatbuffers 2.0
    Uninstalling flatbuffers-2.0:
      Successfully uninstalled flatbuffers-2.0
  Attempting uninstall: coloredlogs
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: coloredlogs 15.0.1
    Uninstalling coloredlogs-15.0.1:
      Successfully uninstalled coloredlogs-15.0.1
  Attempting uninstall: onnxruntime-gpu
    WARNING: Ignoring invalid distribution -umpy (/disk/conda3/envs/py38/lib/python3.8/site-packages)
    Found existing installation: onnxruntime-gpu 1.12.0
    Uninstalling onnxruntime-gpu-1.12.0:
      Successfully uninstalled onnxruntime-gpu-1.12.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
onnx 1.12.0 requires protobuf<=3.20.1,>=3.12.2, but you have protobuf 4.21.2 which is incompatible.
Successfully installed coloredlogs-15.0.1 flatbuffers-2.0 humanfriendly-10.0 mpmath-1.2.1 numpy-1.23.0 onnxruntime-gpu-1.12.0 packaging-21.3 protobuf-4.21.2 pyparsing-3.0.9 sympy-1.10.1

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here. If the issue is about a particular model, please share the model details as well to facilitate debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiissues related to all other APIs: C, C++, Python, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions