pygame安装:找不到sdl-config命令 [英] pygame installation: sdl-config command not found

查看:770
本文介绍了pygame安装:找不到sdl-config命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用过

./configure --prefix=$HOME
make
make install

要安装sdl2, 之后,我尝试通过

to install sdl2, after which I tried to install pygame by

cd ../pygame-1.9.1release/
python setup.py install

但是我遇到一个错误:

linuxnx:~/python/library/pygame-1.9.1release> python setup.py install
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
Hunting dependencies...
sh: sdl-config: command not found
WARNING: "sdl-config" failed!
sh: smpeg-config: command not found
WARNING: "smpeg-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.

推荐答案

我搜索了很长时间,因为我需要Eric Matthes编写的Python Crash Course软件包,但找不到有助于运行的答案 pip install pygame 没有错误,最后找到了一种对我有用的解决方案

I searched a long time, cause I needed the package for Python Crash Course by Eric Matthes, but couldn't find the answer that would help running pip install pygame without errors and finally found 1 line solution that worked for me

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-dev libavcodec-dev libfreetype6-dev

这篇关于pygame安装:找不到sdl-config命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆