Fasttext: error: command 'gcc' failed with exit status 1

Created on 15 Apr 2018  Â·  2Comments  Â·  Source: facebookresearch/fastText

I tried to install fastText. i have the following library already installed:

boto (2.48.0)
boto3 (1.7.4)
botocore (1.10.4)
bz2file (0.98)
certifi (2018.1.18)
chardet (3.0.4)
Cython (0.28.2)
docutils (0.14)
future (0.16.0)
futures (3.2.0)
gensim (3.4.0)
idna (2.6)
jmespath (0.9.3)
numpy (1.14.2)
pandas (0.21.0)
pip (9.0.1)
pybind11 (2.3.dev0)
python-dateutil (2.6.1)
pytz (2017.3)
requests (2.18.4)
s3transfer (0.1.13)
scipy (1.0.0)
setuptools (38.4.0)
six (1.11.0)
smart-open (1.5.7)
urllib3 (1.22)
wheel (0.30.0)

When i execute pip setup.py install, i get the following error:

running install
running bdist_egg
running egg_info
writing requirements to python/fasttext.egg-info/requires.txt
writing python/fasttext.egg-info/PKG-INFO
writing top-level names to python/fasttext.egg-info/top_level.txt
writing dependency_links to python/fasttext.egg-info/dependency_links.txt
reading manifest file 'python/fasttext.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python/fasttext.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/2.7.14/include/python2.7 -c /tmp/tmpHRVXvd.cpp -o tmp/tmpHRVXvd.o -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/2.7.14/include/python2.7 -c /tmp/tmpezCz4K.cpp -o tmp/tmpezCz4K.o -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
building 'fasttext_pybind' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/project/6008168/tamouze/Python_directory/ENV2.7_new/include/site/python2.7 -I/project/6008168/tamouze/Python_directory/ENV2.7_new/include/site/python2.7 -Isrc -I/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/2.7.14/include/python2.7 -c python/fastText/pybind/fasttext_pybind.cc -o build/temp.linux-x86_64-2.7/python/fastText/pybind/fasttext_pybind.o -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
python/fastText/pybind/fasttext_pybind.cc:13:31: fatal error: pybind11/pybind11.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

my gcc is:

gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

How can i solve problem please?

Build

Most helpful comment

Bumped into this myself. Newest commit (060936f) in pybind11 fixes this. Add git+https://github.com/pybind/pybind11.git@060936f to requirements or install it before installing fastText.

All 2 comments

Bumped into this myself. Newest commit (060936f) in pybind11 fixes this. Add git+https://github.com/pybind/pybind11.git@060936f to requirements or install it before installing fastText.

@jaakkopasanen I replaced the original pybind11/__init__.py with your modified corresponding python file, but the error mentioned above still occured. Is there other way to solve this error?

Was this page helpful?
0 / 5 - 0 ratings