pip install nmslib 失败 (error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1)
生活随笔
收集整理的這篇文章主要介紹了
pip install nmslib 失败 (error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1. 問題現(xiàn)象
使用 pip 安裝 nmslib 命令時出現(xiàn)如下錯誤:
sudo pip install nmslib
....ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-OKEXAd/nmslib/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-NUl5Qs --python-tag cp27:ERROR: running bdist_wheelrunning buildrunning build_extcreating tmpx86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c /tmp/tmpgSa_ft.cpp -o tmp/tmpgSa_ft.o -std=c++14cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c /tmp/tmpih024X.cpp -o tmp/tmpih024X.o -fvisibility=hiddencc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++building 'nmslib' extensioncreating buildcreating build/temp.linux-x86_64-2.7creating build/temp.linux-x86_64-2.7/nmslibcreating build/temp.linux-x86_64-2.7/nmslib/similarity_searchcreating build/temp.linux-x86_64-2.7/nmslib/similarity_search/srccreating build/temp.linux-x86_64-2.7/nmslib/similarity_search/src/methodcreating build/temp.linux-x86_64-2.7/nmslib/similarity_search/src/spacex86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I./nmslib/similarity_search/include -I/usr/local/include/python2.7 -I/home/deepnorth/.local/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c nmslib.cc -o build/temp.linux-x86_64-2.7/nmslib.o -O3 -march=native -fopenmp -DVERSION_INFO="1.7.3.6" -std=c++14 -fvisibility=hiddencc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++nmslib.cc:16:31: fatal error: pybind11/pybind11.h: No such file or directorycompilation terminated.error: command 'x86_64-linux-gnu-gcc' failed with exit status 1----------------------------------------ERROR: Failed building wheel for nmslib...
2. 解決方法
sudo apt-get install unixodbc-devsudo pip install nmslib
總結(jié)
以上是生活随笔為你收集整理的pip install nmslib 失败 (error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux shell 学习笔记(15)
- 下一篇: Ubuntu 打 deb 包报错(fpm