-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Import error with onnx-1.7.0 in mac os catalina #2808
Comments
@chinhuang007 : Can you take a look at this issue? |
@askhade sorry, I am not a mac user. I will see what I can do and update. |
@askhade @shonigs I just tried on a new Mac, with python 3.7.7, protobuf 3.12.2, onnx 1.7.0, and it works fine. (venv) Chins-MBP:onnx chinhuang$ python
|
I tried to install on my Mac with Python 3.7.7 and onnx 1.7.0. But I believe it should be a protobuf's issue. Hope it helps. Thanks. |
I've also faced this problem on my mac with It went away when I downgraded to |
Thank you, @yoavz. This worked perfectly for me as well. |
To be clear, the key here is to compile and install ONNX with a much lower version of protobuf. For example:
Then we can install TensorFlow as normal, which will also upgrade the version of protobuf.
The information here is not clear, installing from source with a higher version of protobuf won't work. |
Hi @dreamibor, |
This is the output of runninng
I tested with a clean virtual environment by running:
And it will fail on MacOS Catalina 10.15.7, the ONNX version is 1.8.0 installed through pip, and my Python version is 3.8.3. |
Thank you for providing the info. I can repro this now.
I have 2 questions:
Thank you for bringing this up again to remind that this issue is still not resolved. |
Hi @jcwchen,
Thanks |
I cannot get it to work, after trying several combinations of protobuf, onnx and tensorflow... |
Hi @alvercau, |
I finally got it to work! For one reason or another, everything works fine in a conda environment (I was using a Virtualenv environment before). If installed in this order:
everything works as it should. |
What's ONNX version you installed by using conda? |
It is version 1.7.0 |
Thanks @alvercau for finding conda does work. It makes sense to me because the ONNX wheel is built by MacOS 10.15 in conda. (https://github.com/conda-forge/onnx-feedstock/blob/master/.azure-pipelines/azure-pipelines-osx.yml) Provide another workaround for users who want to use the latest ONNX: |
building from source didn't work for me... I kept on getting the libprotobuf error. |
|
Hi @alvercau, |
I believe this problem should be resolved in ONNX 1.8.1. Please let me know if ONNX 1.8.1 still doesn't work from your end. Thank you all! |
@jcwchen I can confirm on my Mac, the problem is gone with ONNX 1.8.1 |
@dreamibor Thank you so much for the feedback! Close this issue now. Please let me know if this issue still exists with your ONNX 1.8.1 and I will reopen this issue. Thank you. |
Hi I get the following error when I
import onnx
(python 3.7.7)with onnx-1.6.0 no import errors
I tried changing version of protobuf
using either
and
brew reinstall protobuf
didn't help
Any Ideas? I have been trinying to fix this all day
The text was updated successfully, but these errors were encountered: