Pycharm Pygame error

Hello, when I go into my project interpreter and try to install the Pygame package it doesn't work. I've installed Pygame through the CMD prompt by typing "pip install Pygame" and there are no errors in there. But when I try to install it through Pycharm it sends me an error below:


Collecting pygame
Using cached
Complete output from command python egg_info:

WARNING, No "Setup" File Exists, Running "buildconfig/"
Using WINDOWS configuration...

Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x86"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\toddj\AppData\Local\Temp\pycharm-packaging\pygame\", line 194, in <module>
File "C:\Users\toddj\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\toddj\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\toddj\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line


Command "python egg_info" failed with error code 1 in C:\Users\toddj\AppData\Local\Temp\pycharm-packaging\pygame\

Comment actions Permalink



Please try to install the package to the same venv in a command line as described here 


Do you get the same result? 

Comment actions Permalink

ran into this error on Pycharm v. 2019.3.3 community edition, pygame version 1.9.6

* pip install pygame ran fine in command prompt outside pycharm project venv.

* pip install pygame failed with the above error inside pyCharm & inside venv from command prompt


--> upgraded pip inside Pycharm to  version  20.0.2

--> install of pygame was successful afterwards.

Comment actions Permalink

I got an error while installing the pygame module in pycharm IDE

Command "python egg_info" failed with error code 1 in C:\Users\HP\AppData\Local\Temp\pip-install-wckwzmel\pygame\

It is showing me this error...........

Comment actions Permalink

As Antonina Belianskaya said, make sure the package is actually located in the same virtual environment.

If i run 'pip install pygame' in cmd, this happens: 

''Requirement already satisfied: pygame in c:\users\<username>\appdata\local\programs\python\python38-32\lib\site-packages '''

This directory exists so that 3rd party packages can be installed here. Read the source for for more details.

Then one solution is to copy the package from that location and paste it in the virtual environment you are using:

'''C:\Users\<username>\PycharmProjects\<Name of the project>\venv\Lib\site-packages'''

When pygame is in this directory, the import pygame statement on the IDE should work. If not, turn the computer on and off 3 times while saying bloody pygame in front of a mirror.


Please sign in to leave a comment.