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

ImportError: initialization failed when trying to import in python #87

Open
miccio-dk opened this issue Jan 10, 2023 · 2 comments
Open

Comments

@miccio-dk
Copy link

Hi all,
I'm trying to get ViSQOL to work through python
I followed all the installation steps and got the main script to work from the command line.
However, when I run the example code mentioned in the README, I hit this error:

>>> from visqol import visqol_lib_py
Add a python dependency on "@com_google_protobuf//:protobuf_python"
ModuleNotFoundError: No module named 'google'
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ModuleNotFoundError: No module named 'google'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: initialization failed

It seems there's an extra dependency needed, but I'm having a hard time decyphering the error message.
What exactly am I missing?
Thanks in advance :)

@kingfuzz
Copy link

kingfuzz commented Feb 16, 2023

Hi :-)

Apparently, there's a dependency on protobuf. Installing that package fixes the issue for me.

@chris-hld
Copy link

Just for reference, I also needed
conda install -c conda-forge libstdcxx-ng=12
in my environment, to get rid of the GLIBCXX version error.

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

3 participants