I am using ONNX for the first time in conjunction with YOLO according to this guide on Github. Every time I try to run a piece of code that imports ONNX, I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/onnx/__init__.py", line 8, in <module>
from onnx.external_data_helper import load_external_data_for_model, write_external_data_tensors
File "/usr/local/lib/python3.6/dist-packages/onnx/external_data_helper.py", line 10, in <module>
from .onnx_pb import TensorProto, ModelProto
File "/usr/local/lib/python3.6/dist-packages/onnx/onnx_pb.py", line 8, in <module>
from .onnx_pb2 import * # noqa
File "/usr/local/lib/python3.6/dist-packages/onnx/onnx_pb2.py", line 7, in <module>
from google.protobuf.internal import enum_type_wrapper
(I messed up copying the traceback, but the error is an import error: cannot import name 'enum_type_wrapper' or something similar)
As far as I can tell, there's an issue with some dependencies or versions, but when I try to reinstall onnx I get that all the necessary dependencies have already been installed.
Requirement already satisfied: onnx in /usr/local/lib/python3.6/dist-packages
Requirement already satisfied: protobuf in /usr/local/lib/python3.6/dist-packages/protobuf-3.8.0-py3.6-linux-aarch64.egg (from onnx)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from onnx)
Requirement already satisfied: six in /home/msc-xavier/.local/lib/python3.6/site-packages (from onnx)
Requirement already satisfied: typing>=3.6.4 in /usr/local/lib/python3.6/dist-packages (from onnx)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /usr/local/lib/python3.6/dist-packages (from onnx)
Requirement already satisfied: setuptools in /home/msc-xavier/.local/lib/python3.6/site-packages (from protobuf->onnx)
I have searched all over Github and stackoverflow and no other user has gotten the same error. I have made sure that I am using up to date libraries and Python (3.6.9) and that pip is updated, but none of that seems to be the problem. I'd appreciate some guidance here.