gpt4 book ai didi

python - 安装 pygame 时出现 easy_install 错误

转载 作者:太空宇宙 更新时间:2023-11-04 09:01:31 24 4
gpt4 key购买 nike

我尝试使用 easy_install 安装 pygame,但不幸的是它无法正常工作...这是 shell 的输出:

Searching for pygame
Reading http://pypi.python.org/simple/pygame/
Reading http://www.pygame.org/
Reading http://www.pygame.org/download.shtml
Best match: pygame 1.9.1release
Downloading http://www.pygame.org/ftp/pygame-1.9.1release.zip
Processing pygame-1.9.1release.zip
Running pygame-1.9.1release/setup.py -q bdist_egg --dist-dir /tmp/easy_install-OZaKoo/pygame-1.9.1release/egg-dist-tmp-2a4m8V


WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...


Hunting dependencies...
SDL : found 1.2.14
FONT : found
IMAGE : found
MIXER : found
SMPEG : found 0.4.5
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: found
PORTTIME: found

If you get compiler errors during install, doublecheck
the compiler flags in the "Setup" file.


Continuing With "setup.py"
warning: no files found matching 'readme.txt'
no previously-included directories found matching '*/CVS'
no previously-included directories found matching '*/*/CVS'
In file included from /usr/include/python2.7/Python.h:8:0,
from src/pygame.h:75,
from src/imageext.c:47:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
src/imageext.c: In function ‘write_jpeg’:
src/imageext.c:315:9: warning: variable ‘lines_written’ set but not used [-Wunused-but-set-variable]
src/imageext.c:313:9: warning: variable ‘row_stride’ set but not used [-Wunused-but-set-variable]
src/imageext.c: In function ‘SaveJPEG’:
src/imageext.c:391:9: warning: variable ‘alpha’ set but not used [-Wunused-but-set-variable]
src/imageext.c: In function ‘initimageext’:
src/imageext.c:659:15: warning: variable ‘module’ set but not used [-Wunused-but-set-variable]
src/mixer.c: In function ‘chan_set_volume’:
src/mixer.c:660:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
In file included from /usr/include/python2.7/Python.h:8:0,
from src/scrap.h:22,
from src/scrap.c:30:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from src/scrap.c:59:0:
src/scrap_x11.c: In function ‘_get_data_as’:
src/scrap_x11.c:567:17: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
src/scrap_x11.c: In function ‘pygame_scrap_get_types’:
src/scrap_x11.c:825:9: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type [enabled by default]
/usr/include/python2.7/dictobject.h:114:17: note: expected ‘Py_ssize_t *’ but argument is of type ‘int *’
src/scrap.c: In function ‘initscrap’:
src/scrap.c:329:15: warning: variable ‘mod’ set but not used [-Wunused-but-set-variable]
In file included from src/_camera.c:36:0:
src/camera.h:42:32: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

我已经尝试过这些命令,我​​在其他线程上看到:

sudo apt-get install python-dev

sudo apt-get install libevent-dev

感谢任何帮助 :D 很抱歉,但我是一个真正的 ubuntu 菜鸟 :P

最佳答案


sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-开发 libavcodec-dev

sudo apt-get install python-pygame

关于python - 安装 pygame 时出现 easy_install 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20453268/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com