python3.8에 파이 게임을 어떻게 설치하나요? [복제]

Aug 18 2020

캐시 된 pygame-1.9.6.tar.gz (3.2MB)를 사용하여 파이 게임 수집 오류 : 종료 상태 1로 명령 오류가 발생했습니다. 명령 : / usr / bin / python3 -c 'import sys, setuptools, tokenize; sys.argv [0] = ' "'" '/tmp/pip-install-lva53fx4/pygame/setup.py' " '"'; file = ' "'" '/ tmp / pip-install-lva53fx4 / pygame / setup.py' " '"'; f = getattr (tokenize, ' "'" 'open' " '"', 열기) ( 파일 ) ; code = f.read (). replace ( ' "'" '\ r \ n' " '"', ' "'" '\ n' " '"'); f.close (); exec (compile ( 코드, 파일 , ' "'" 'exec' " '"')) 'egg_info --egg-base / tmp / pip-install-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로 명령 오류가 발생했습니다.

답변

Hubert Aug 18 2020 at 13:50

현재로서는 공식 버전이 없습니다. 개발 버전이 있습니다.

pip install pygame==2.0.0.dev6

하지만 3.7로 돌아가서 기다리시는 것이 좋습니다.

shyam_gupta Aug 18 2020 at 14:02

이것을 사용하십시오 sudo apt-get install python3-pygame