Closed e-spaulding closed 4 years ago
Try to install kenlm in the designated environment directly from github, using the following command:
pip install https://github.com/kpu/kenlm/archive/master.zip
Hmm, that didn't work either. Here is the full output of my error, in case it is useful:
elizabeth@elizabeth-pc>> pip install https://github.com/kpu/kenlm/archive/master.zip
Collecting https://github.com/kpu/kenlm/archive/master.zip
Using cached https://github.com/kpu/kenlm/archive/master.zip (539 kB)
Building wheels for collected packages: kenlm
Building wheel for kenlm (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/elizabeth/anaconda3/envs/pytorch14/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-evp4vasl/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-evp4vasl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-o6jf_wa1
cwd: /tmp/pip-req-build-evp4vasl/
Complete output (13 lines):
running bdist_wheel
running build
running build_ext
building 'kenlm' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/util
creating build/temp.linux-x86_64-3.8/lm
creating build/temp.linux-x86_64-3.8/util/double-conversion
creating build/temp.linux-x86_64-3.8/python
/home/elizabeth/anaconda3/envs/pytorch14/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/elizabeth/anaconda3/envs/pytorch14/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/elizabeth/anaconda3/envs/pytorch14/include -fPIC -I. -I/home/elizabeth/anaconda3/envs/pytorch14/include/python3.8 -c util/integer_to_string.cc -o build/temp.linux-x86_64-3.8/util/integer_to_string.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command '/home/elizabeth/anaconda3/envs/pytorch14/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for kenlm
Running setup.py clean for kenlm
Failed to build kenlm
Installing collected packages: kenlm
Running setup.py install for kenlm ... error
ERROR: Command errored out with exit status 1:
command: /home/elizabeth/anaconda3/envs/pytorch14/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-evp4vasl/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-evp4vasl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-963rarnk/install-record.txt --single-version-externally-managed --compile --install-headers /home/elizabeth/anaconda3/envs/pytorch14/include/python3.8/kenlm
cwd: /tmp/pip-req-build-evp4vasl/
Complete output (13 lines):
running install
running build
running build_ext
building 'kenlm' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/util
creating build/temp.linux-x86_64-3.8/lm
creating build/temp.linux-x86_64-3.8/util/double-conversion
creating build/temp.linux-x86_64-3.8/python
/home/elizabeth/anaconda3/envs/pytorch14/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/elizabeth/anaconda3/envs/pytorch14/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/elizabeth/anaconda3/envs/pytorch14/include -fPIC -I. -I/home/elizabeth/anaconda3/envs/pytorch14/include/python3.8 -c util/integer_to_string.cc -o build/temp.linux-x86_64-3.8/util/integer_to_string.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command '/home/elizabeth/anaconda3/envs/pytorch14/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/elizabeth/anaconda3/envs/pytorch14/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-evp4vasl/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-evp4vasl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-963rarnk/install-record.txt --single-version-externally-managed --compile --install-headers /home/elizabeth/anaconda3/envs/pytorch14/include/python3.8/kenlm Check the logs for full command output.
I suspect this might be due to the fact that you only have a c-compiler, and no c++-compiler installed; in your environment, try (this includes a number of additional packages that might not be installed):
linux: conda install gxx_linux-64 zlib bzip2 boost
mac: conda install clangxx_osx-64 zlib bzip2 boost
and then try installing kenlm again:
pip install https://github.com/kpu/kenlm/archive/master.zip
Alternatively, you could try installing a system-wide c++-compiler
I got a bunch of conflicting packages for trying to install boost
, but installing the other ones and then installing kenlm from github worked! Thank you!
Hi,
I can't seem to get my environment built. I'm actually getting this exact error. Is there a previous version of conda I should go back to? I have already tried updating it to the latest version and I get the same issue.