Closed zjwang21 closed 1 year ago
Please make sure you have uninstalled previous version of k2 installed via conda install.
The safest way is to create a new virtual environment to install k2. If the issue still exists, we can look into it.
Please make sure you have uninstalled previous version of k2 installed via conda install.
The safest way is to create a new virtual environment to install k2. If the issue still exists, we can look into it.
I have tried your suggestions. I am installing k2 from sourcet rather than conda because I cannot reach the network. The issue still exists. looking forward to your suggestions.
Have you created a fresh virtual environment to install k2?
Also, please use pip install to install PyTorch if you want to install k2 from source.
Have you created a fresh virtual environment to install k2?
Also, please use pip install to install PyTorch if you want to install k2 from source.
Yes, I installed all the pkgs through pip, except that I create the virtual environment by conda.
Did you install k2 before using conda install?
Please check that there is only one file _k2*.so on the python module search path in your environment.
Did you install k2 before using conda install?
Please check that there is only one file _k2*.so on the python module search path in your environment.
I found that this error occurs when I run k2 on the slrum nodes.
When I run
srun -p speech --gpus-per-task 1 strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX_3.4.20
it returns nothing.
Perhaps this error is caught by the lack of GLIBCXX_3.4.20.
I wonder if there is a way to use GLIBCXX_3.4.19 or lower with k2, otherwise, I will have to install GLIBCXX_3.4.20.
If you install k2 from source and have this issue, possible reasons are listed below:
k2 was compiled on one system but you are running it on a different system.
You have used conda instal to install k2 but you don't remove it before you install k2 from source.
You are using GCC installed by conda to compile k2 but you use system libstdc++ to run k2.
Do you match one of the items above?
Sorry for wasting your time. I use gcc 7.5.0 to install k2, but I forget to export the lib64 path of gcc 7.5.0. After that, k2 works fine. Thanks for your reply~
Installing from source
pip install torch-1.13.1+cpu-cp39-cp39-linux_x86_64.whl, git clone https://github.com/k2-fsa/k2.git cd k2 export K2_MAKE_ARGS="-j12" export K2_CMAKE_ARGS="-DK2_WITH_CUDA=OFF" python setup.py install
the outputs of python -m k2.version seems right. but when I try to run my project, the following error occurs:import k2 File "/mnt/cache/wangzhijun2/anaconda3/envs/speech/lib/python3.9/site-packages/k2-1.23.4.dev20230324+cpu.torch1.13.1-py3.9-linux-x86_64.egg/k2/__init__.py", line 23, in <module> from _k2 import DeterminizeWeightPushingType from _k2 import DeterminizeWeightPushingType ImportError: /lib64/libstdc++.so.6: version
GLIBCXX_3.4.20' not found (required by /mnt/cache/wangzhijun2/anaconda3/envs/speech/lib/python3.9/site-packages/k2-1.23.4.dev20230324+cpu.torch1.13.1-py3.9-linux-x86_64.egg/k2/lib64/libk2fsa.so) from _k2 import DeterminizeWeightPushingType `