models icon indicating copy to clipboard operation
models copied to clipboard

failed to install swig_decoders

Open zhaifly opened this issue 9 years ago • 15 comments

hi! when i run 'models/deep_speech_2/setup.sh' it always says ''module' object has no attribute 'ccompiler'' and failed to install swig_decoders image

my env: centos:7.3 python:2.7.5 gcc: 4.8.5

also: when i run 'python setup.py install --num_processes 4' in 'models/deep_speech_2/decoders/swig' the following error comes: image

anyone can help me! very thanks!

zhaifly avatar Sep 25 '17 07:09 zhaifly

Could you provide the version of your distutils package?

pkuyym avatar Sep 25 '17 11:09 pkuyym

thanks very much for your reply!

image

zhaifly avatar Sep 25 '17 12:09 zhaifly

Can you import ccompiler from terminal?

kuke avatar Sep 25 '17 13:09 kuke

Sorry for this error. It seems that ccompiler is deprecated in newer version of distutils. Our test environment is python 2.7.3 and will find some solutions.

pkuyym avatar Sep 25 '17 13:09 pkuyym

@kuke cannot import ccompiler @pkuyym thanks and i will try python 2.7.3 later!

zhaifly avatar Sep 25 '17 13:09 zhaifly

I just found that python2.7.10 contains distutils.ccompiler.CCompiler.compile. Please make sure after importing from setuptools import setup, Extension, distutils, distutils.ccompiler.CCompiler.compile can be found. Maybe some dependencies are missing like one of setup, Extension

pkuyym avatar Sep 25 '17 13:09 pkuyym

@pkuyym distutils.ccompilser.CCompiler.compile can be found with python 2.7.13 but still flailed to install swig_decoders image

zhaifly avatar Sep 25 '17 13:09 zhaifly

Please goto decoders/swig to run sh setup.sh and you will see more detailed information.

pkuyym avatar Sep 25 '17 13:09 pkuyym

here is the output log after run 'sh setup.sh' log.txt

zhaifly avatar Sep 25 '17 14:09 zhaifly

Seems that you have installed swig_decoders successfully

kuke avatar Sep 25 '17 15:09 kuke

@kuke I rebuild paddle with python 2.7.10, and re-setup deep_speech_2, but still have this issue image

image

zhaifly avatar Sep 26 '17 03:09 zhaifly

@kuke when I run 'swig -python -c++ ./decoders.i' swig version:2.0.10 error occurs! image

zhaifly avatar Sep 26 '17 05:09 zhaifly

thanks you all @pkuyym @kuke this issue is relevant to swig, after upgrade from 2.0.10 to 3.0.12, everything goes well

zhaifly avatar Sep 26 '17 06:09 zhaifly

@zhaifly how were you able to change the swig version from 2.0.10 to 3.0.12

I have downloaded the swig 3.0.12 from this link http://www.swig.org/download.html and the followed the below process to install which is given in this link http://swig.org/svn.html

even after it successfully installed it gives the below output

[root@redhat-7 test120]# swig -version
bash: /bin/swig: No such file or directory

rituraj17 avatar Apr 17 '18 08:04 rituraj17

@rituraj17 I install successfully following the README file in the download from this link http://www.swig.org/download.html

dancinghui avatar May 17 '18 06:05 dancinghui