1

I try to install matplotlib,

sudo python2.7 setup.py install

after I got error like:

SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel

How to solve this problem? Help me.

Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62
  • 1
    Possible duplicate of [Python 3.4 and 2.7: Cannot install numpy package for python 3.4](http://stackoverflow.com/questions/24892810/python-3-4-and-2-7-cannot-install-numpy-package-for-python-3-4) – Greg Eremeev Apr 11 '17 at 07:08
  • 1
    Possible duplicate of [fatal error: Python.h: No such file or directory](http://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory) – daphtdazz Apr 11 '17 at 08:57

1 Answers1

0

Try installing python-dev dependency before your stuff.

sudo apt-get install python-dev
Abdul Gaffar
  • 340
  • 3
  • 5