상세 컨텐츠

본문 제목

pygqme을 설치할수 없습니다

pygame

by 안졸리냐젤리 2021. 10. 14. 02:26

본문

윈도우 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:\users\...\appdata\local\temp\pip-tnjf7m-build 이런 에러가 뜨네요

 

---댓글---

pygame 사이트에서 직접 다운 받아서 설치해보세요

 

---댓글---

다운받은 다음에 어떻게 설치해요?

 

---댓글---

.msi 파일이라서 그냥 설치 하면 되요 pygame.org/download.shtml 

 

---댓글---

윈도우용 mercurial  이라고 있는데 사용해보셨나요? mercurial.selenic.com/wiki/WindowsInstall

hg 는 mercurial  에서 쓰는 명령어입니다.

 

 

 

 

---답변---

1. pip 로 설치하려면 리눅스에서는

sudo apt-get build-dep python-pygame

 

2. mercurial 을 사용해서 설치 하실거면

sudo apt-get install mercurial 

로 설치하시면 됩니다.

 

윈도우에서 설치 하실때는 

https://www.mercurial-scm.org/wiki/Downloa

여기를 참조 하시면 되구요

 

3. pip 로 설치 하실때는 

pip install hg+http://bitbucket.org/pygame/pygame

로 설치 하실수 있습니다.

 

만약 리눅스에서 위의 방법으로 했는데 freetype-config: not found   에러가 뜨면

sudo apt-get install libfreetype6-dev 를 실행 하고 다시 시도 해 보세요

 

 

깃헙에서 소스를 직접 받아서 빌드 할 수도 있습니다

# Grab source

hg clone https://bitbucket.org/pygame/pygame

# Finally build and install

cd pygame

python setup.py build

sudo python setup.py install

 

출처 : https://stackoverflow.com/questions/17869101/unable-to-install-pygame-using-pip

관련글 더보기