尝试在python3.8 Arch Linux上下载pygame时出错

因此,当我尝试使用pip3下载pygame时,出现错误。我尝试多种方式

  • sudo apt install python3-pygame

  • sudo apt-get install python3-pygame

  • sudo pip3安装pygame

    我尝试在pip安装上执行所有这些操作 它给了我这个错误。



jorge@raspberrypi:~$ python3 -m pip install -U pygame --user
Collecting pygame
  Downloading pygame-1.9.6.tar.gz (3.2 MB)
     |████████████████████████████████| 3.2 MB 1.7 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t3uuppky/pygame/setup.py'"'"'; __file__='"'"'/tmp/pip-install-t3uuppky/pygame/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-t3uuppky/pygame/pip-egg-info
         cwd: /tmp/pip-install-t3uuppky/pygame/
    Complete output (29 lines):
    
    
    WARNING,No "Setup" File Exists,Running "buildconfig/config.py"
    Using UNIX configuration...
    
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: sdl-config: not found
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    
    Hunting dependencies...
    WARNING: "sdl-config" failed!
    WARNING: "pkg-config freetype2" failed!
    WARNING: "freetype-config" failed!
    Unable to run "sdl-config". Please make sure a development version of SDL is installed.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

相关文章

Python中的函数(二) 在上一篇文章中提到了Python中函数的定...
Python中的字符串 可能大多数人在学习C语言的时候,最先接触...
Python 面向对象编程(一) 虽然Python是解释性语言,但是它...
Python面向对象编程(二) 在前面一篇文章中谈到了类的基本定...
Python中的函数(一) 接触过C语言的朋友对函数这个词肯定非...
在windows下如何快速搭建web.py开发框架 用Python进行web开发...