kaldi icon indicating copy to clipboard operation
kaldi copied to clipboard

Kaldi still need python2.7 when being built on macOS

Open haaddii opened this issue 3 years ago • 14 comments
trafficstars

Python2.7 had been removed from macOS since 12.3. But it seems like the build process still need python2.

And since I am using an arm based machine, I can't install python2 since there's no such package for Darwin arm64.

I try to build it without python2 and didn't provide openblas path for expecting it using the accerlate. It stops without printout any unexpected errors after printing a lot lines of "checking" and "config.status". run.log

haaddii avatar Apr 12 '22 22:04 haaddii

thanks for reporting this I think you could install python2.7 via brew but not sure if it's a good solution. Kaldi still needs py2.7, unfortunately (or to be precise, at least some scripts in some recipes do). But most of the main scripts should run just fine once you get past the kaldi install.

On Tue, Apr 12, 2022 at 6:03 PM Hardy @.***> wrote:

Python2.7 had been removed from macOS since 12.3. But it seems like the build process still need python2.

I tried built it without python2 and didn't provide openblas path for expecting it using the accerlate. And it stops without printout any unexpected errors after printing a lot lines of "checking" and "config.status". run.log https://github.com/kaldi-asr/kaldi/files/8476844/run.log

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4725, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX2AKVTPP43PGTIFLALVEXXJHANCNFSM5TIVBDHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jtrmal avatar Apr 13 '22 14:04 jtrmal

My POV is that if someone wants to run an antiquated recipe, they should simply check out a version of Kaldi around the time the recipe was built with. That, among other things, is the best for reproducing a corresponding paper's results. I would not worry about egs, only the common scripts. @jtrmal, whadya think?

kkm000 avatar Apr 16 '22 02:04 kkm000

I'd be OK to have python2.7 be removed from the dependency list. It seems only a few local scripts still require it.

danpovey avatar Apr 16 '22 05:04 danpovey

Update: ~~And since I am using an arm based machine, I can't install python2 since there's no such package for Darwin arm64.~~ It's my fault for not doing further googling. I just thought I can't install python2 on my machine, since the brew install python2 command install a x86 version for me and fail with error saying wrong arch or so.

But actually I can use Pyenv to install a Cpython2.7 then install virtualenv and create a venv, source it. So then I can have a python2.7 that is arm64 on a M1 series system.

I can have kaldi running on my machine now. Though it would be great if python3 can be the default python version in kaldi.

haaddii avatar Apr 25 '22 13:04 haaddii

Is it possible to simply alias python with python3 and use it with the dependency on python2.7 removed from the list of dependencies?

hemakaveri avatar Feb 23 '23 05:02 hemakaveri

it is not that easy to do it this way, unfortunately y.

On Thu, Feb 23, 2023 at 12:39 AM hemakaveri @.***> wrote:

Is it possible to simply alias python with python3 and use it with the dependency on python2.7 removed from the list of dependencies?

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441241385, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX3XKCLEWAJMW3GPJE3WY3ZX3ANCNFSM5TIVBDHA . You are receiving this because you were mentioned.Message ID: @.***>

jtrmal avatar Feb 23 '23 15:02 jtrmal

Is there any other way?

On Thu, 23 Feb 2023 at 20:34, jtrmal @.***> wrote:

it is not that easy to do it this way, unfortunately y.

On Thu, Feb 23, 2023 at 12:39 AM hemakaveri @.***> wrote:

Is it possible to simply alias python with python3 and use it with the dependency on python2.7 removed from the list of dependencies?

— Reply to this email directly, view it on GitHub <https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441241385 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACUKYX3XKCLEWAJMW3GPJE3WY3ZX3ANCNFSM5TIVBDHA

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441942769, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3QCDVZAIXJKSAXN34PGH3LWY537BANCNFSM5TIVBDHA . You are receiving this because you commented.Message ID: @.***>

hemakaveri avatar Feb 23 '23 15:02 hemakaveri

no other way as far as I am aware. y.

On Thu, Feb 23, 2023 at 10:37 AM hemakaveri @.***> wrote:

Is there any other way?

On Thu, 23 Feb 2023 at 20:34, jtrmal @.***> wrote:

it is not that easy to do it this way, unfortunately y.

On Thu, Feb 23, 2023 at 12:39 AM hemakaveri @.***> wrote:

Is it possible to simply alias python with python3 and use it with the dependency on python2.7 removed from the list of dependencies?

— Reply to this email directly, view it on GitHub < https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441241385 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACUKYX3XKCLEWAJMW3GPJE3WY3ZX3ANCNFSM5TIVBDHA

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441942769 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3QCDVZAIXJKSAXN34PGH3LWY537BANCNFSM5TIVBDHA

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441993680, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX7MUJDILXF73GRFWO3WY574XANCNFSM5TIVBDHA . You are receiving this because you were mentioned.Message ID: @.***>

jtrmal avatar Feb 23 '23 15:02 jtrmal

The problem is that new Mac machines (M1, M2) donot support python 2.7. -hema

On Thu, Feb 23, 2023 at 9:22 PM jtrmal @.***> wrote:

no other way as far as I am aware. y.

On Thu, Feb 23, 2023 at 10:37 AM hemakaveri @.***> wrote:

Is there any other way?

On Thu, 23 Feb 2023 at 20:34, jtrmal @.***> wrote:

it is not that easy to do it this way, unfortunately y.

On Thu, Feb 23, 2023 at 12:39 AM hemakaveri @.***> wrote:

Is it possible to simply alias python with python3 and use it with the dependency on python2.7 removed from the list of dependencies?

— Reply to this email directly, view it on GitHub < https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441241385 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACUKYX3XKCLEWAJMW3GPJE3WY3ZX3ANCNFSM5TIVBDHA

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441942769 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3QCDVZAIXJKSAXN34PGH3LWY537BANCNFSM5TIVBDHA

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1441993680 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACUKYX7MUJDILXF73GRFWO3WY574XANCNFSM5TIVBDHA

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4725#issuecomment-1442019151, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3QCDV4DEDY62KNUPUB6RI3WY6BURANCNFSM5TIVBDHA . You are receiving this because you commented.Message ID: @.***>

hemakaveri avatar Feb 24 '23 03:02 hemakaveri

I think python 2 has been dead so thoroughly for so long a time that hardly anyone would want to run the egs that require it.

Let's remove it from general dependencies. It's causing problems and, besides, simply embarrassing... :)

kkm000 avatar Feb 24 '23 06:02 kkm000

I'd like to reopen this issue again for discussion because Python2 is being fazed out of main Linux distros. For example: https://wiki.debian.org/Python/2Removal, so you can't even build Kaldi on current stable version of Debian.

The only reason for python2 was (I think) due to Phonetisaurus, but that also got upgraded to python3, afaik.

danijel3 avatar Aug 03 '23 11:08 danijel3

Python 2.7 is no longer available with Debian Bookworm. I was able to edit the check_dependencies.sh script in tools to get past that check, and then created the python directory and .use_default_python file in tools. I did not install python 2.7, and so far I haven't run into anything that actually requires it. Could it be made an optional, suggested component?

aaronchantrill avatar Mar 06 '24 00:03 aaronchantrill