PaddleSpeech icon indicating copy to clipboard operation
PaddleSpeech copied to clipboard

DeepSpeech 里面 setup.sh 安装swig_decoders报错的问题

Open bolt163 opened this issue 8 years ago • 7 comments

https://github.com/PaddlePaddle/DeepSpeech 参考这里 Paddle都安装好,包括相关的 c源码依赖包都已安好。。。执行 setup.sh的时候,

kenlm/util/tokenize_piece.hh:8:46: fatal error: boost/iterator/iterator_facade.hpp: No such file or directory #include <boost/iterator/iterator_facade.hpp> ^ compilation terminated. error: command 'gcc' failed with exit status 1

boost库安装了,在PATH里面也设定了 BOOST_ROOT 手动进入 kenlm的安装目录下去make编译都能正常编过, 求大侠指点下这个问题

bolt163 avatar Mar 14 '18 06:03 bolt163

@bolt163 请用礼貌的用语提issue

此处的报错明显是boost的安装问题,请先确保boost的正确安装。

每一种处理方式都有设计者的考虑,当前安装方式的好处是可以一键安装,坏处就是对于一个经验不足的使用者来说,一旦出现问题定位起来比较麻烦,请理解。

kuke avatar Mar 14 '18 07:03 kuke

Sorry! boost安装我确认是ok的,因为单独进 kenlm安装是Ok, 如果boost安装有问题kenlm依赖了这个库必然是编不过的

bolt163 avatar Mar 14 '18 07:03 bolt163

在boost的安装路径下是否能找到这个头文件?如果头文件能找到,但build的时候未能正确包含,可以在此处把头文件路径追加进来

https://github.com/PaddlePaddle/DeepSpeech/blob/1abb9767780799ddcd05c61684bfba764b00cee6/decoders/swig/setup.py#L104-L109

kuke avatar Mar 14 '18 08:03 kuke

@kuke 有的哈 cd iterator l(root) bolt163@gpucommtest1[bolt163]:/data/anaconda2/3rd/boost/include/boost/iterator> ls counting_iterator.hpp function_input_iterator.hpp is_lvalue_iterator.hpp iterator_archetypes.hpp # iterator_facade.hpp new_iterator_tests.hpp transform_iterator.hpp detail indirect_iterator.hpp is_readable_iterator.hpp iterator_categories.hpp iterator_traits.hpp permutation_iterator.hpp zip_iterator.hpp filter_iterator.hpp interoperable.hpp iterator_adaptor.hpp iterator_concepts.hpp minimum_category.hpp reverse_iterator.hpp (root) bolt163@gpucommtest1[bolt163]:/data/anaconda2/3rd/boost/include/boost/iterator> pwd /data/anaconda2/3rd/boost/include/boost/iterator 我再试试,多谢

bolt163 avatar Mar 14 '18 08:03 bolt163

感谢 kuke的解答, “ 在boost的安装路径下是否能找到这个头文件?如果头文件能找到,但build的时候未能正确包含,可以在此处把头文件路径追加进来

DeepSpeech/decoders/swig/setup.py

Lines 104 to 109 in 1abb976

include_dirs=[ '.', 'kenlm', 'openfst-1.6.3/src/include', 'ThreadPool', ], ” 把 boost的 include路径添加到 Include_dirs之后,解决了上面的问题,也可以import swig_decoders这个模块了;

但是当进到 examples下的 tiny 执行 run_train.sh的时候报错: No module named py_paddle.swig_paddle, 这个有点不解了,是需先安装 swig_paddle吗。。

Traceback (most recent call last): File "train.py", line 129, in main() File "train.py", line 124, in main log_clipping=True) File "/data1/Paddle/python/paddle/v2/init.py", line 128, in init import py_paddle.swig_paddle as api ImportError: No module named py_paddle.swig_paddle Failed in training!

————这个问题我自己fix了

bolt163 avatar Mar 14 '18 12:03 bolt163

Great,应该是paddle没有正确安装

kuke avatar Mar 15 '18 09:03 kuke

@bolt163 您好,请问您是怎么解决这个问题的?这个项目支持在没有GPU的机器上运行么?谢谢

hui001 avatar Aug 24 '19 14:08 hui001