코드쉐어

고정 헤더 영역

글 제목

메뉴 레이어

코드쉐어

메뉴 리스트

  • 홈
  • 태그
  • 방명록
  • 분류 전체보기 (12)
    • openpyxl (6)
    • pygame (6)

검색 레이어

코드쉐어

검색 영역

컨텐츠 검색

pygame

  • Pygame, sounds don't play 파이게임에서 소리 재생이 안됩니다.

    2021.10.15 by 안졸리냐젤리

  • Pygame error: 'pygame' has no attribute 'init'

    2021.10.15 by 안졸리냐젤리

  • pygame 에서 텍스트를 어떻게 표시 하나요?

    2021.10.15 by 안졸리냐젤리

  • dll load failed 1은(는) 올바른 win32 응용 프로그램이 아닙니다

    2021.10.14 by 안졸리냐젤리

  • ImportError: No module named 'pygame'

    2021.10.14 by 안졸리냐젤리

  • pygqme을 설치할수 없습니다

    2021.10.14 by 안졸리냐젤리

Pygame, sounds don't play 파이게임에서 소리 재생이 안됩니다.

import pygame pygame.init() pygame.mixer.init() sounda= pygame.mixer.Sound("desert_rustle.wav") sounda.play() 위의 코드를 실행하면 소리가 안나요. 왜 그런 것일까요? ###답변### pygame.mixer.init() 가 pygame.init() 보다 먼저 수행 되어야 합니다. 두개의 순서를 바꿔 주세요 import pygame, time pygame.mixer.init() pygame.init() sounda= pygame.mixer.Sound("beep.wav") sounda.play() 출처 : https://stackoverflow.com/questions/2936914/pygame-sounds-dont-play

pygame 2021. 10. 15. 01:33

Pygame error: 'pygame' has no attribute 'init'

파이게임을 설치 후 실행시 다음과 같은 에러가 발생 합니다 AttributeError: module 'pygame' has no attribute 'init' 원인이 무엇일까요? ###답변### 아마도 당신의 파일 이름이 pygame.py 인것 같습니다. pygame 은 모듈의 이름이므로 파일의 이름을 pygame 이 아닌 다른 이름으로 바꿔 주세요 출처 : https://stackoverflow.com/questions/34343894/pygame-error-pygame-has-no-attribute-init

pygame 2021. 10. 15. 01:28

pygame 에서 텍스트를 어떻게 표시 하나요?

###질문### 파이게임에서 텍스트를 디스플레이 하는 법을 잘 모르겠습니다. IDLE 에서 print 하는 방식으로는 할수 없다는걸 잘 알고 있습니다. import pygame, sys from pygame.locals import * BLACK = ( 0, 0, 0) WHITE = (255, 255, 255) GREEN = (0, 255, 0) RED = ( 255, 0, 0) pygame.init() size = (700, 500) screen = pygame.display.set_mode(size) DISPLAYSURF = pygame.display.set_mode((400, 300)) pygame.display.set_caption('P.Earth') while 1: # main game loop..

pygame 2021. 10. 15. 01:25

dll load failed 1은(는) 올바른 win32 응용 프로그램이 아닙니다

python 3.1 버전에서 pygame 을 설치 하고 import 했더니 다음과 같은 에러가 뜹니다 ImportError: DLL load failed: %1 is not a valid Win32 application. dll load failed 1은(는) 올바른 win32 응용 프로그램이 아닙니다 도와주세요!! ###답변### 아마도 파이썬의 32bit , 64bit 와 pygame 의 bit 가 맞지 않아 발생하는 현상으로 보입니다. 둘다 32비트 혹은 64비트로 설치 해 보세요 ###답변### 위의 답변으로 해 봤는데 해결이 안되어서 저는 https://sourceforge.net/projects/pywin32/ 에서 pywin32 를 설치 하고 해결이 되었습니다 ###답변### 저는 파이썬 2..

pygame 2021. 10. 14. 02:38

ImportError: No module named 'pygame'

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import pygame Traceback (most recent call last): File "", line 1, in import pygame ImportError: No module named 'pygame' >>> 윈도우 7 64 에서 python 3.3.2 , pygame 1.9.2a0 를 설치 한뒤 import pygame 를 했는데 위의 에러가 발생 합니다 어떻게 해결 해야 할까요? ###답변### p..

pygame 2021. 10. 14. 02:32

pygqme을 설치할수 없습니다

윈도우 7에서 pip로 pygame 을 설치하려고 하는데 다음 에러가 뜨네요 "Could not install requirement Pygame because of HTTP error HTTP error 400: Bad request for URL ..." 구글을 검색해 봤는데 딱히 뭐가 검색되는건 없고 스택오버플로우 보니까 pip install hg+http://bitbucket.org/pygame/pygame 이렇게 하라는데, Cannot find command hg 라는 에러가 또 뜹니다. 많이 찾아 봤는데 대부분 Mac 에 관한 답변만 있습니다. 윈도우에서 해결법좀 알려주세요~ ---댓글--- hg+ 지우고 다시 해보면 "Cannot determine archive format of c:\user..

pygame 2021. 10. 14. 02:26

추가 정보

인기글

최신글

페이징

이전
1
다음
TISTORY
코드쉐어 © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바