【发布时间】:2016-05-01 15:15:05
【问题描述】:
所以我一直在遵循一些关于如何通过此链接安装 Pygame 的说明:http://programarcadegames.com/index.php?showpart=0#section_0.3
最后三个命令如下
$
# Use mercurial to clone current code
hg clone https://bitbucket.org/pygame/pygame
# Build and install
cd pygame
sudo python3 setup.py
$
当我运行最后一个命令来运行安装文件时,在一切正常之前我得到了这个错误。
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
关于如何解决此问题并完成 Pygame 安装的任何想法?
【问题讨论】:
标签: python python-3.x pygame installation ubuntu-14.04