Closed raom88 closed 1 year ago
Hi @raom88
this usually means that you do not have the python development libraries installed, which include the python header files for example (as indicated by the missing Python.h
). You will need to install the required package that contains Python.h
for your distribution, and then compilation should work.
@tazend Thanks for pointing it out. Issue is resolved now.
For Amazon Linux 2, this command installed dev libraries :
sudo yum install python3-devel
Details
Issue
When I try to build pyslurm by running ./scripts/build.sh , it fails and throw this error: INFO: Found Slurm shared library in /opt/slurm/lib INFO: Found Slurm header in /opt/slurm/include/slurm INFO: Detected Slurm version - 22.05 INFO: Building PySlurm from source... INFO: Checking for objects to clean INFO: Removing build/ INFO: Removing: pyslurm/pyslurm.c INFO: cleanup done Compiling pyslurm/pyslurm.pyx because it changed. [1/1] Cythonizing pyslurm/pyslurm.pyx running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/pyslurm copying pyslurm/init.py -> build/lib.linux-x86_64-3.7/pyslurm copying pyslurm/version.py -> build/lib.linux-x86_64-3.7/pyslurm running build_ext building 'pyslurm.pyslurm' extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/pyslurm gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ipyslurm -I/opt/slurm/include/ -I. -I/usr/include/python3.7m -c pyslurm/pyslurm.c -o build/temp.linux-x86_64-3.7/pyslurm/pyslurm.o pyslurm/pyslurm.c:38:10: fatal error: Python.h: No such file or directory
include "Python.h"
compilation terminated. error: command 'gcc' failed with exit status 1