1

I am trying to install the libxml2 library.during installing this error occures.

make[4]: Entering directory `/home/madhuv/y/libxml2-2.9.2/python'
CC libxml.lo
libxml.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
make[4]: *** [libxml.lo] Error 1
make[4]: Leaving directory `/home/madhuv/y/libxml2-2.9.2/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/madhuv/y/libxml2-2.9.2/python'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/madhuv/y/libxml2-2.9.2/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/madhuv/y/libxml2-2.9.2'
make: *** [all] Error 2.

please help me.

A.B.
  • 89,123
  • 21
  • 245
  • 323
Sebastian Joy
  • 29
  • 2
  • 3
  • try installting `python-dev` by: `sudo apt-get install python-dev` – Ron May 15 '15 at 09:38
  • possible duplicate of [How do I handle a "No such file or directory" error for a header file from make?](http://askubuntu.com/questions/592863/how-do-i-handle-a-no-such-file-or-directory-error-for-a-header-file-from-make) – muru May 15 '15 at 09:41

1 Answers1

1

You need the development library libpython-dev:

sudo apt-get install libpython-dev

Currently the command installs libpython2.7-dev


$ apt-file search /Python.h

[..]
libpython2.7-dbg: /usr/include/python2.7_d/Python.h
libpython2.7-dev: /usr/include/python2.7/Python.h
libpython3.4-dbg: /usr/include/python3.4dm/Python.h
libpython3.4-dev: /usr/include/python3.4m/Python.h
[..]
A.B.
  • 89,123
  • 21
  • 245
  • 323