7

I get the below error when trying to install pygame with pip:

Command "python setup.py egg_info" failed with error code 1 in 
C:\Users\danie\AppData\Local\Temp\pip-install-8zxzuqef\pygame\

I don't know what this means, and when i look up in other places to tells me to fix my environment variables. But it still doesn't work.

6
  • How exactly are you trying to install pygame? Which operating system and Python version do you use? Commented Jul 2, 2018 at 15:50
  • @skrx Using Windows 10, python 3.7. Aand i'm not sure what you mean by "How exactly are you trying to install pygame" I thought tehre was only method. Commented Jul 2, 2018 at 15:53
  • There are different methods. Commented Jul 2, 2018 at 15:55
  • @skrx Well I downloaded python, downloaded and installed pip and then did "pip install pygame" and thats how far i got to. Commented Jul 2, 2018 at 15:57
  • try this stackoverflow.com/questions/35991403/… Commented Jul 2, 2018 at 15:58

3 Answers 3

3

Update: Pygame 1.9.4 has been released and you can download and install it with pip again. In Windows I recommend installing it with: py -3.7 -m pip install pygame


There are no official precompiled pygame packages for Python 3.7 available yet, so pip install pygame doesn't work, but you can get a pygame wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

Download pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl if you have a 64-bit Python version or pygame‑1.9.3‑cp37‑cp37m‑win32.whl if you have a 32-bit version. Then open the command-line, navigate to the directory that contains the wheel file and install it with pip:

py -3.7 -m pip install pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl

This solution works only in Windows, so users with other operating systems have to wait and use Python 3.6.

Sign up to request clarification or add additional context in comments.

3 Comments

"Then open the command-line navigate to the directory that contains the wheel file and install it with pip" Not sure how to do this :/
Enter cd path_to_the_directory (replace path_to_the_directory with the actual path to your download directory).
Great! I think it's worked. Thank you for your help.
0

On debian

sudo apt-get install python3-pygame

works.

Comments

-2

Try :

py -3.7 -m pip install pygame

2 Comments

Tried This and i get: Requirement already up-to-date: setuptools in c:\users\danie\appdata\local\programs\python\python37-32\lib\site-packages (39.2.0) Still no luck after that though.
I dont know why people gave you dislikes it worked for me as I am having trouble with pip

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.