JoshData / pdf-diff

A PDF comparison utility in Python.
Creative Commons Zero v1.0 Universal
448 stars 65 forks source link

fatal error: Python.h File missing during setup #31

Open mgritz opened 6 years ago

mgritz commented 6 years ago

There seems to be a glitch in the installer of master, 6a74da70280106526fbf020a8849c74e473d9cba When running sudo python3 setup.py install I get

Processing diff_match_patch_python-1.0.2.tar.gz
Writing /tmp/easy_install-ifsfz1nn/diff_match_patch_python-1.0.2/setup.cfg
Running diff_match_patch_python-1.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ifsfz1nn/diff_match_patch_python-1.0.2/egg-dist-tmp-1dq3j8ko
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
interface.cpp:1:10: fatal error: Python.h: File or directory not found
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I am running an almost virgin Ubuntu 17.10, Kernel Version 4.13.0-37-generic on an x86 and did an sudo apt-get install python3-lxml poppler-utils beforehands.

I'll be looking into that as soon as I got time for it but if you know any releief I'd be glad to hear about it. Thanks and have a nice weekend!

JoshData commented 6 years ago

Try sudo apt-get install python3-dev?

Bilb commented 5 years ago

It does work