Skip to content

Installation fails with python 3.12, newer setuptools, newer ubuntu. #327

@al-zatv

Description

@al-zatv

I want to use pykaldi with python 3.12 . Unfortunately, there is no precompiled wheel, so I have to build it myself.
Problems:

  1. tools/install_kaldi.sh don't work because it requires python 2.7
    Solution: in kaldi/tools/extras/check_dependencies.sh , line 93:
 pythonok=true
if ! have python2.7; then
  echo "$0: python2.7 is not installed"
  add_packages python27 python2.7
  pythonok=false
fi

I remove everything except line pythonok=true . After that, it installs without any problems.

  1. python setup.py test fails because with errors on of old testing infrastructure, line tests_requre=['pytest'] in setup.py, etc.
    Solution: Fresh setuptools package deprecate something used here. I downgrade it with:
    pip install --upgrade 'setuptools<72'

  2. Some tests with python setup.py test are failing with errors in numpy. It's because of numpy>=2.
    Solution: Looks like it's easy to update code to numpy>=2, but I decide to not take this risk:) So I just downgrade numpy to 1.x:
    pip install --upgrade 'numpy<2'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions