dkriegner / xrayutilities

xrayutilities - a package with useful scripts for X-ray diffraction physicists
http://xrayutilities.sourceforge.io
GNU General Public License v2.0
83 stars 29 forks source link

Compilation fails to find `Python.h` #105

Closed ezatterin closed 4 years ago

ezatterin commented 4 years ago

Hi,

On a fresh python 3.7 environment pip installing xrayutilities fails during compilation with the following error:

In file included from src/gridder2d.c:26:0:
src/gridder.h:34:20: fatal error: Python.h: No such file or directory
#include <Python.h>
                        ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Ideas? Thanks!

dkriegner commented 4 years ago

it seems to me you are missing the python dev headers.

See https://github.com/dkriegner/xrayutilities/blob/master/README.md#requirements

for python 3.7 on linux no binary package is available on pypi. thats something which might need fixing. Note to myself: try to generate linux packages either on appveyor or travis

ezatterin commented 4 years ago

Indeed

apt-get install python3.7-dev

solved it. Thanks!