pygame 安装:找不到 sdl-config 命令 [英] pygame installation: sdl-config command not found
本文介绍了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 安装 pygame
没有错误,终于找到了对我有用的 1 行解决方案
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屋!
查看全文