DeepSpeech 里面 setup.sh 安装swig_decoders报错的问题
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 请用礼貌的用语提issue
此处的报错明显是boost的安装问题,请先确保boost的正确安装。
每一种处理方式都有设计者的考虑,当前安装方式的好处是可以一键安装,坏处就是对于一个经验不足的使用者来说,一旦出现问题定位起来比较麻烦,请理解。
Sorry! boost安装我确认是ok的,因为单独进 kenlm安装是Ok, 如果boost安装有问题kenlm依赖了这个库必然是编不过的
在boost的安装路径下是否能找到这个头文件?如果头文件能找到,但build的时候未能正确包含,可以在此处把头文件路径追加进来
https://github.com/PaddlePaddle/DeepSpeech/blob/1abb9767780799ddcd05c61684bfba764b00cee6/decoders/swig/setup.py#L104-L109
@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 我再试试,多谢
感谢 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
————这个问题我自己fix了
Great,应该是paddle没有正确安装
@bolt163 您好,请问您是怎么解决这个问题的?这个项目支持在没有GPU的机器上运行么?谢谢