pykaldi / pykaldi

A Python wrapper for Kaldi
https://pykaldi.github.io
Apache License 2.0
991 stars 248 forks source link

Broken Wheels #302

Closed chrisspen closed 1 year ago

chrisspen commented 2 years ago

The whl files linked to http://ltdata1.informatik.uni-hamburg.de/pykaldi/ don't seem to work.

conda create --prefix ./.cenv -c defaults -y python=3.9
conda activate ./.cenv
wget http://ltdata1.informatik.uni-hamburg.de/pykaldi/pykaldi-0.2.2-cp39-cp39-linux_x86_64.whl
pip install pykaldi-0.2.2-cp39-cp39-linux_x86_64.whl
python
>>> from kaldi.asr import NnetLatticeFasterRecognizer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/project/.cenv/lib/python3.9/site-packages/kaldi/__init__.py", line 14, in <module>
    from . import base
  File "/project/.cenv/lib/python3.9/site-packages/kaldi/base/__init__.py", line 1, in <module>
    from ._kaldi_error import *
ImportError: /project/.cenv/lib/python3.9/site-packages/kaldi/base/_kaldi_error.so: undefined symbol: _ZN5kaldi25g_abort_on_assert_failureE
bmilde commented 2 years ago

You still need to install the pykaldi compatible Kaldi version after installing the pip package. It's currently not bundled into the whl. See the instructions on https://github.com/pykaldi/pykaldi at "Starting a new project with a pykaldi whl package". You should use the install_kaldi.sh script.

Maybe we could improve the error message though, so that it points users in the right direction (missing kaldi install).

chrisspen commented 2 years ago

@bmilde Thanks, but that script doesn't work either. #303

chrisspen commented 2 years ago

Yeah, both the conda and virtualenv install methods fail due to a missing MKL library. Where do we obtain that?

bmilde commented 2 years ago

https://github.com/pykaldi/pykaldi/blob/master/tools/install_mkl.sh

chrisspen commented 2 years ago

Thanks. That makes things easier. You might want to chmod +x so it's executable by default like the other scripts.

bmilde commented 1 year ago

done