0

So I've been following some instructions on how to install Pygame from this link here :http://programarcadegames.com/index.php?showpart=0#section_0.3

The the final three commands are as follows

$
# Use mercurial to clone current code
hg clone https://bitbucket.org/pygame/pygame

# Build and install
cd pygame
sudo python3 setup.py
$

When I run the final command to run the setup file, I get this error after everything before it runs fine.

building 'pygame.imageext' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D_REENTRANT -DENABLE_NEWBUF=1 -I/usr/X11R6/include -I/usr/include/SDL -I/usr/include/SDL -I/usr/include -I/usr/include -I/usr/include/python2.7 -c src/imageext.c -o build/temp.linux-x86_64-2.7/src/imageext.o
In file included from src/pygame.h:32:0,
                 from src/imageext.c:49:
src/_pygame.h:80: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

Any ideas as to how I cann fix this issue and complete my Pygame installation?

1 Answer 1

2

You need to install the python development package, which includes those header files.

sudo apt-get install python-dev
Sign up to request clarification or add additional context in comments.

Comments

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.