k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.1k stars 214 forks source link

Recommended ways to install k2 #1232

Open csukuangfj opened 1 year ago

csukuangfj commented 1 year ago

I just updated the doc about installing k2. Please see

https://k2-fsa.github.io/k2/installation/from_wheels.html#

Screenshot 2023-07-23 at 21 58 41
npovey commented 1 year ago

Hi, I am getting this error when training a zipformer model

AttributeError: module 'k2' has no attribute 'swoosh_r'

here is my installation of icefall https://medium.com/@nadirapovey/k2fsa-icefall-instalation-1085fae845d2 in short I did:

(venv) np@np-INTEL:~/anna$ pip install k2==1.21.dev20221008+cuda11.3.torch1.12.1 -f https://k2-fsa.org/nightly/
csukuangfj commented 1 year ago

Please update your k2.

Please follow our latest doc to install k2. https://k2-fsa.github.io/k2/installation/from_wheels.html

csukuangfj commented 1 year ago

In your case, please replace

pip install k2==1.21.dev20221008+cuda11.3.torch1.12.1 -f https://k2-fsa.org/nightly/

with

pip install k2==1.24.3.dev20230725+cuda11.3.torch1.12.1 -f https://k2-fsa.github.io/k2/cuda.html
npovey commented 1 year ago

Thanks Fangjun, It worked.