2

I followed the instructions at http://nltk.org/install.html. My python version is 2.7.

When I try to do:

sudo pip install -U numpy

That doesn't work:

  File "numpy/core/setup.py", line 271, in check_types

    "Cannot compile 'Python.h'. Perhaps you need to "\

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

Any ideas to help me?

5
  • 4
    Perhaps you need to install python-dev or python-devel? Commented Mar 10, 2013 at 12:03
  • Wow! Well, I have never installed them for sure. How can I install them? Commented Mar 10, 2013 at 12:04
  • 4
    type sudo apt-get install python-dev in the command line Commented Mar 10, 2013 at 12:05
  • YEAH!!! Thank you a lot!! That was the issue! Thank you for your help! Commented Mar 10, 2013 at 12:36
  • 10
    I like how the problem was solved by reading the message. Commented Mar 10, 2013 at 13:22

1 Answer 1

3

As pointed out by User in the comments, executing

sudo apt-get install python-dev

in the command line will fix this problem

Sign up to request clarification or add additional context in comments.

1 Comment

What if you are in OSX?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.