ModuleNotFoundError: No module named '_swig_decoders'
State: closed | Pull request: no
Labels: name: stale

hello
when i try to install beam search decoders and kenlm to build a language model for asr i face this error:
`
(asr) root@DESKTOP-GD87QE2:/home/azad/decoders# ./setup.sh
Install decoders ...
scorer.h:22: Warning 401: Nothing known about base class 'lm::EnumerateVocab'. Ignored.
running install
/root/anaconda3/envs/asr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/root/anaconda3/envs/asr/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing ctc_decoders.egg-info/PKG-INFO
writing dependency_links to ctc_decoders.egg-info/dependency_links.txt
writing top-level names to ctc_decoders.egg-info/top_level.txt
reading manifest file 'ctc_decoders.egg-info/SOURCES.txt'
writing manifest file 'ctc_decoders.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying swig_decoders.py -> build/lib.linux-x86_64-cpython-39
running build_ext
building '_swig_decoders' extension
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c ctc_beam_search_decoder.cpp -o build/temp.linux-x86_64-cpython-39/ctc_beam_search_decoder.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c ctc_greedy_decoder.cpp -o build/temp.linux-x86_64-cpython-39/ctc_greedy_decoder.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c decoder_utils.cpp -o build/temp.linux-x86_64-cpython-39/decoder_utils.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c decoders_wrap.cxx -o build/temp.linux-x86_64-cpython-39/decoders_wrap.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
In file included from decoder_utils.cpp:1:
decoder_utils.h:5:10: fatal error: fst/log.h: No such file or directory
    5 | #include "fst/log.h"
      |          ^~~~~~~~~~~
compilation terminated.
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c kenlm/lm/bhiksha.cc -o build/temp.linux-x86_64-cpython-39/kenlm/lm/bhiksha.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
In file included from ctc_greedy_decoder.cpp:2:
decoder_utils.h:5:10: fatal error: fst/log.h: No such file or directory
    5 | #include "fst/log.h"
      |          ^~~~~~~~~~~
compilation terminated.
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c kenlm/lm/binary_format.cc -o build/temp.linux-x86_64-cpython-39/kenlm/lm/binary_format.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
In file included from scorer.h:14,
                 from ctc_beam_search_decoder.h:8,
                 from ctc_beam_search_decoder.cpp:1:
path_trie.h:10:10: fatal error: fst/fstlib.h: No such file or directory
   10 | #include "fst/fstlib.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
gcc -pthread -B /root/anaconda3/envs/asr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -I/root/anaconda3/envs/asr/include -fPIC -O2 -isystem /root/anaconda3/envs/asr/include -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/root/anaconda3/envs/asr/include/python3.9 -c kenlm/lm/config.cc -o build/temp.linux-x86_64-cpython-39/kenlm/lm/config.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
error: command '/usr/bin/gcc' failed with exit code 1
In file included from scorer.h:14,
                 from decoders_wrap.cxx:2840:
path_trie.h:10:10: fatal error: fst/fstlib.h: No such file or directory
   10 | #include "fst/fstlib.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
Testing installation ...
kenlm/lm/binary_format.cc: In member function ‘void lm::ngram::BinaryFormat::FinishFile(const lm::ngram::Config&, lm::ngram::ModelType, unsigned int, const std::vector<long unsigned int>&)’:
kenlm/lm/binary_format.cc:261:9: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct lm::ngram::Parameters’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
  261 |   memset(&params, 0, sizeof(Parameters));
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kenlm/lm/binary_format.cc:1:
kenlm/lm/binary_format.hh:42:8: note: ‘struct lm::ngram::Parameters’ declared here
   42 | struct Parameters {
      |        ^~~~~~~~~~
Traceback (most recent call last):
  File "/home/azad/decoders/ctc_decoders_test.py", line 5, in <module>
    from ctc_decoders import Scorer, ctc_beam_search_decoder
  File "/home/azad/decoders/ctc_decoders.py", line 6, in <module>
    import swig_decoders
  File "/home/azad/decoders/swig_decoders.py", line 15, in <module>
    import _swig_decoders
ModuleNotFoundError: No module named '_swig_decoders'`

any help is really appreciated.
thanks