【问题标题】:How do i install pygame in python3.8? [duplicate]如何在 python3.8 中安装 pygame? [复制]
【发布时间】:2020-08-18 06:46:30
【问题描述】:

收集 pygame 使用缓存的 pygame-1.9.6.tar.gz (3.2 MB) 错误:命令出错,退出状态为 1: 命令:/usr/bin/python3 -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lva53fx4/pygame/setup.py'"'"'; 文件='"'"'/tmp/pip-install-lva53fx4/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-安装-lva53fx4/pygame/pip-egg-info cwd:/tmp/pip-install-lva53fx4/pygame/ 完整输出(29 行):

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.
----------------------------------------

错误:命令出错,退出状态为 1:

【问题讨论】:

标签: python pygame sdl-2 ubuntu-20.04


【解决方案1】:

目前还没有正式版本。有开发版:

pip install pygame==2.0.0.dev6

但我建议你回到 3.7 并等待。

【讨论】:

    【解决方案2】:

    使用这个 sudo apt-get install python3-pygame

    【讨论】:

      猜你喜欢
      • 2021-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-04
      • 2021-04-02
      • 1970-01-01
      相关资源
      最近更新 更多