[英]unable to install pygame_sdl2 via pip
I am trying to install pygame-sdl2
on my ubuntu platform. 我正在尝试在ubuntu平台上安装pygame-sdl2
。
when I run command: pip install -i https://test.pypi.org/simple/ pygame_sdl2
on teerminal I get this error: 当我在pip install -i https://test.pypi.org/simple/ pygame_sdl2
上运行命令: pip install -i https://test.pypi.org/simple/ pygame_sdl2
,出现此错误:
Looking in indexes: https://test.pypi.org/simple/
Collecting pygame_sdl2
Using cached https://test-files.pythonhosted.org/packages/2f/f1/8dd343ae2d97c432cf1c81ca03d2d0472396f9d8e76c677aeae9ce2ec61d/pygame_sdl2-2.1.0.tar.gz
Complete output from command python setup.py egg_info:
sh: 1: sdl2-config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-tXTEZE/pygame-sdl2/setup.py", line 39, in <module>
parse_cflags([ "sh", "-c", "sdl2-config --cflags" ])
File "setuplib.py", line 93, in parse_cflags
output = subprocess.check_output(command, universal_newlines=True)
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['sh', '-c', 'sdl2-config --cflags']' returned non-zero exit status 127
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-tXTEZE/pygame-sdl2/
https://github.com/renpy/pygame_sdl2#building https://github.com/renpy/pygame_sdl2#building
To compile pygame_sdl2 from sources you need SDL2, SDL2_gfx, SDL2_image, SDL2_mixer, and SDL2_ttf libraries. 要从源代码编译pygame_sdl2,您需要SDL2,SDL2_gfx,SDL2_image,SDL2_mixer和SDL2_ttf库。
sudo apt-get install build-essential python-dev libsdl2-dev \
libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
libjpeg-dev libpng-dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.