attardi/deepnl

ImportError: Building module deepnl.hpca failed: ["distutils.errors.CompileError: command 'gcc' failed with exit status 1\n"]

RamshaSaeed opened this issue · 0 comments

Hi
I tried to run the file dl-words-pca.py and it produces the following error:

File "", line 1, in
runfile('/home/ramsha/deepnl/bin/dl-words-pca.py', wdir='/home/ramsha/deepnl/bin')

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
execfile(filename, namespace)

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/home/ramsha/deepnl/bin/dl-words-pca.py", line 35, in
import deepnl.hpca as hpca

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 445, in load_module
if self.init_path:

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 232, in load_module
else:

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 216, in load_module
mod = imp.load_dynamic(name, so_path)

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 192, in build_module
assert os.path.exists(so_path), "Cannot find: %s" % so_path

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()

File "/home/ramsha/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)

File "/home/ramsha/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/Cython/Distutils/build_ext.py", line 164, in run

File "/home/ramsha/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/Cython/Distutils/build_ext.py", line 172, in build_extensions

File "/home/ramsha/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)

File "/home/ramsha/anaconda3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

File "/home/ramsha/anaconda3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)

ImportError: Building module deepnl.hpca failed: ["distutils.errors.CompileError: command 'gcc' failed with exit status 1\n"]

runfile('/home/ramsha/deepnl/bin/dl-words-pca.py', wdir='/home/ramsha/deepnl/bin')
Reloaded modules: deepnl, deepnl.embeddings
Traceback (most recent call last):

File "", line 1, in
runfile('/home/ramsha/deepnl/bin/dl-words-pca.py', wdir='/home/ramsha/deepnl/bin')

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
execfile(filename, namespace)

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/home/ramsha/deepnl/bin/dl-words-pca.py", line 35, in
import deepnl.hpca as hpca

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 445, in load_module
if self.init_path:

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 232, in load_module
else:

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 216, in load_module
mod = imp.load_dynamic(name, so_path)

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 192, in build_module
assert os.path.exists(so_path), "Cannot find: %s" % so_path

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()

File "/home/ramsha/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)

File "/home/ramsha/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/Cython/Distutils/build_ext.py", line 164, in run

File "/home/ramsha/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()

File "/home/ramsha/anaconda3/lib/python3.6/site-packages/Cython/Distutils/build_ext.py", line 172, in build_extensions

File "/home/ramsha/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)

File "/home/ramsha/anaconda3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

File "/home/ramsha/anaconda3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)

ImportError: Building module deepnl.hpca failed: ["distutils.errors.CompileError: command 'gcc' failed with exit status 1\n"]

I am using anaconda 5 and python 3.6. I've tried upgrading Cython to the latest version but te problem persists. My GCC version is 5.4.0.

Can you please help me to solve this issue?