libnfs icon indicating copy to clipboard operation
libnfs copied to clipboard

pip install libnfs on linux report error"error: command 'gcc' failed with exit status 1"

Open koalaxiu7 opened this issue 5 years ago • 3 comments

could you help check why "pip install libnfs“ report gcc error?

root@master:manager# python -V Python 3.6.8 root@master:manager# pip install libnfs Collecting libnfs Using cached https://files.pythonhosted.org/packages/e5/d6/5b6ad2d2838a5e077417daaae31d749d06c418c91e520eaad80e1f363547/libnfs-1.0.post4.tar.gz Building wheels for collected packages: libnfs Building wheel for libnfs (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x0gfjj1n/libnfs/setup.py'"'"'; file='"'"'/tmp/pip-install-x0gfjj1n/libnfs/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-yfzsep38 --python-tag cp36 cwd: /tmp/pip-install-x0gfjj1n/libnfs/ Complete output (18 lines): /usr/local/lib/python3.6/dist-packages/setuptools/dist.py:476: UserWarning: Normalizing '1.0-4' to '1.0.post4' normalized_version, running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/libnfs copying libnfs/libnfs.py -> build/lib.linux-x86_64-3.6/libnfs copying libnfs/init.py -> build/lib.linux-x86_64-3.6/libnfs running build_ext building 'libnfs._libnfs' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/libnfs x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c libnfs/libnfs_wrap.c -o build/temp.linux-x86_64-3.6/libnfs/libnfs_wrap.o libnfs/libnfs_wrap.c:130:21: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for libnfs Running setup.py clean for libnfs Failed to build libnfs Installing collected packages: libnfs Running setup.py install for libnfs ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x0gfjj1n/libnfs/setup.py'"'"'; file='"'"'/tmp/pip-install-x0gfjj1n/libnfs/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-0r0ufvrv/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-x0gfjj1n/libnfs/ Complete output (18 lines): /usr/local/lib/python3.6/dist-packages/setuptools/dist.py:476: UserWarning: Normalizing '1.0-4' to '1.0.post4' normalized_version, running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/libnfs copying libnfs/libnfs.py -> build/lib.linux-x86_64-3.6/libnfs copying libnfs/init.py -> build/lib.linux-x86_64-3.6/libnfs running build_ext building 'libnfs._libnfs' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/libnfs x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c libnfs/libnfs_wrap.c -o build/temp.linux-x86_64-3.6/libnfs/libnfs_wrap.o libnfs/libnfs_wrap.c:130:21: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x0gfjj1n/libnfs/setup.py'"'"'; file='"'"'/tmp/pip-install-x0gfjj1n/libnfs/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-0r0ufvrv/install-record.txt --single-version-externally-managed --compile Check the logs for full command output. root@master:manager#

koalaxiu7 avatar Jan 02 '20 09:01 koalaxiu7

any update ? I am facing the same issue.

jaglinux avatar Feb 21 '20 01:02 jaglinux

any update ? I am facing the same issue.

how do you resolve this issue finnally ? i am facing the same issue too.

Selenium39 avatar Oct 26 '20 02:10 Selenium39

https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

On Mon, Oct 26, 2020 at 12:14 PM Selenium [email protected] wrote:

any update ? I am facing the same issue.

how do you resolve this issue finnally ? i am facing the same issue too.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sahlberg/libnfs/issues/306#issuecomment-716264380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADY3EF5MFKJEAMMB3NKJM3SMTLQVANCNFSM4KCAEEUA .

sahlberg avatar Oct 26 '20 03:10 sahlberg