Closed DongjiGao closed 2 years ago
Might be a torch version mismatching, see https://github.com/k2-fsa/k2/pull/949.
ImportError: /export/b14/dgao/k2/build/lib/_k2.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7reshapeEN3c108ArrayRefIlEE
I see that you use conda
to install k2
, but the above error message indicates that you installed k2 from source.
You can either remove the version of k2
installed from conda
or disable the one compiled from source.
Also, the error indicates that you are not using torch 1.11
to compile k2 from source.
I think with the latest master, this would have shown up more clearly as a Torch version mismatch.
On Tue, Apr 19, 2022 at 10:26 AM Fangjun Kuang @.***> wrote:
ImportError: /export/b14/dgao/k2/build/lib/_ k2.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7reshapeEN3c108ArrayRefIlEE
I see that you use conda to install k2, but the above error message indicates that you installed k2 from source.
You can either remove the version of k2 installed from conda or disable the one compiled from source.
Also, the error indicates that you are not using torch 1.11 to compile k2 from source.
— Reply to this email directly, view it on GitHub https://github.com/k2-fsa/k2/issues/960#issuecomment-1101929665, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFLOZMQVR2TUMIXCTJ3STVFYKVPANCNFSM5TWLMRTQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks!
I installed k2 using conda:
conda install -c k2-fsa -c pytorch -c conda-forge k2 python=3.8 cudatoolkit=11.3 pytorch=1.11.0
and got this error while importing k2:my environment: