google / visqol

Perceptual Quality Estimator for speech and audio
Apache License 2.0
641 stars 118 forks source link

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

Open miccio-dk opened 1 year ago

miccio-dk commented 1 year ago

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 commented 1 year ago

Hi :-)

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

chris-hld commented 8 months ago

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.