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

Failed to import the Zivid Python C-module - version `GLIBCXX_3.4.29' not found #155

Open
thibaut-d opened this issue Dec 9, 2021 · 7 comments

Comments

@thibaut-d
Copy link

thibaut-d commented Dec 9, 2021

Hi,

The error arrise on the line:

import zivid

Here are the versions:

  • Ubuntu 21.10
  • Python 3.8
  • libgcc 7.2.0
  • Toshiba Teli driver v3.0.1.1-3
  • Zivid Core + Studio + Tools v2.5.0 - 10/2021
  • Zivid Core source : zivid_2.5.0+19fa6891-1_amd64.deb
  • Zivid Python 2.3.0.2.5.0 (pip installed)
Traceback (most recent call last):
  File "/home/thibaut/anaconda3/envs/moule/lib/python3.8/site-packages/_zivid/__init__.py", line 35, in <module>
    from _zivid._zivid import (  # pylint: disable=import-error,no-name-in-module
ImportError: /home/thibaut/anaconda3/envs/moule/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/thibaut/anaconda3/envs/moule/lib/python3.8/site-packages/_zivid/_zivid.cpython-38-x86_64-linux-gnu.so)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "src/scripts/zdf_to_npy.py", line 8, in <module>
    import zivid
  File "/home/thibaut/anaconda3/envs/moule/lib/python3.8/site-packages/zivid/__init__.py", line 8, in <module>
    import zivid.firmware
  File "/home/thibaut/anaconda3/envs/moule/lib/python3.8/site-packages/zivid/firmware.py", line 2, in <module>
    import _zivid
  File "/home/thibaut/anaconda3/envs/moule/lib/python3.8/site-packages/_zivid/__init__.py", line 74, in <module>
    raise ImportError(__missing_sdk_error_message()) from ex
ImportError: Failed to import the Zivid Python C-module, please verify that:
 - Zivid SDK is installed
 - Zivid SDK version is matching the SDK version part of the Zivid Python version
@eskaur
Copy link
Member

eskaur commented Dec 9, 2021

Hi @thibaut-d !
Thank you for writing up this issue. We really appreciate that you give us all the system info up front.

As you see at the bottom of the zivid-python Readme we only officially support Ubuntu 18.04 and 20.04 (https://github.com/zivid/zivid-python#test-matrix), so unfortunately we don't have coverage for 21.10 in the CI system. Once 22.04 is out we will add official support for that. However, I am confident that it should be possible to get this working on Ubuntu 21.10, and I will do a little investigation to see how it can be done.

In the meantime can you verify for me whether or not the Zivid Studio desktop application works on your system?

@eskaur
Copy link
Member

eskaur commented Dec 9, 2021

Hi again!
I just tested setting all this up in a clean Ubuntu 21.10 Docker container, and zivid-python installation + import zivid all worked fine. However, I used python 3.9 since that is the default python3 on Ubuntu 21.10. Can you try with python 3.9?

@thibaut-d
Copy link
Author

Thanks, I tested too with Anaconda Python 3.8 and 3.9, this does not change the issue.

@thibaut-d
Copy link
Author

Is there some other logs I can provide ?

@thibaut-d
Copy link
Author

I got it running using the system version of Python instead of Anaconda:

conda deactivate myenv
pip3 install zivid

Not very clean but it solve the issue.

@eskaur
Copy link
Member

eskaur commented Dec 10, 2021

Good, then we know it works with the system Python at least.

We don't specifically support the Anaconda setup, so you are a bit on your own there, but I'm sure there is a way to make that work as well. I have one idea: Try uninstalling Zivid SDK and re-install using the 18.04 debs instead of the 20.04 debs. These will expect a different GLIBCXX version, and perhaps it will be the one that your Anaconda has.

Another idea: Update to a newer gcc for building zivid-python.

@eskaur
Copy link
Member

eskaur commented Dec 10, 2021

Also, if you are merely uncomfortable installing directly on the system python, you could always make a normal non-Anaconda venv, python3 -m venv ./myvenv, and install zivid-python in there.

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

No branches or pull requests

2 participants