gpt4 book ai didi

python - pygame安装: sdl-config command not found

转载 作者:行者123 更新时间:2023-11-30 23:32:03 25 4
gpt4 key购买 nike

我用过

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

安装 sdl2,之后我尝试通过

安装 pygame
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 行解决方案

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

关于python - pygame安装: sdl-config command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19579528/

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