Slyne / ctc_decoder

A ctc decoder for both online and offline asr model
58 stars 26 forks source link

install error #6

Closed ben-8878 closed 2 years ago

ben-8878 commented 2 years ago

when i run “python setup.py install”, get follow message:

path_trie.h:52: Error: Syntax error in input(3).
running install
/home/ybZhang/miniconda3/envs/wenet/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/ybZhang/miniconda3/envs/wenet/lib/python3.8/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 swig_decoders.egg-info/PKG-INFO
writing dependency_links to swig_decoders.egg-info/dependency_links.txt
writing top-level names to swig_decoders.egg-info/top_level.txt
file swig_decoders.py (for module swig_decoders) not found
reading manifest file 'swig_decoders.egg-info/SOURCES.txt'
writing manifest file 'swig_decoders.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
file swig_decoders.py (for module swig_decoders) not found
file swig_decoders.py (for module swig_decoders) not found
running build_ext
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-cpython-38/_swig_decoders.cpython-38-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
creating stub loader for _swig_decoders.cpython-38-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/_swig_decoders.py to _swig_decoders.cpython-38.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying swig_decoders.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying swig_decoders.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying swig_decoders.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying swig_decoders.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
__pycache__._swig_decoders.cpython-38: module references __file__
creating 'dist/swig_decoders-1.1-py3.8-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing swig_decoders-1.1-py3.8-linux-x86_64.egg
creating /home/ybZhang/miniconda3/envs/wenet/lib/python3.8/site-packages/swig_decoders-1.1-py3.8-linux-x86_64.egg
Extracting swig_decoders-1.1-py3.8-linux-x86_64.egg to /home/ybZhang/miniconda3/envs/wenet/lib/python3.8/site-packages
Adding swig-decoders 1.1 to easy-install.pth file

Installed /home/ybZhang/miniconda3/envs/wenet/lib/python3.8/site-packages/swig_decoders-1.1-py3.8-linux-x86_64.egg
Processing dependencies for swig-decoders==1.1
Finished processing dependencies for swig-decoders==1.1

when I run commad “python -c "import swig_decoders"”, get follow message , its strange:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'swig_decoders'
Slyne commented 2 years ago

Not sure if your default python is python3. What's the output of python3 -c "import swig_decoders" with the wenet env ?

ben-8878 commented 2 years ago

Not sure if your default python is python3. What's the output of python3 -c "import swig_decoders" with the wenet env ?

my default python is python3 and "import swig_decoders" means that in my wenet python3 env, import swig_decoders

Slyne commented 2 years ago

There seems some errors in your log. Could you attach the full log ?

ben-8878 commented 2 years ago

@Slyne solved it, needs more higher version swig