This question already has answers here:
Unable to install pygame on Python via pip (Windows 10)
(6 answers)
Closed 2 years ago.
Good morning, I have a hellish problem, recently I learned to learn python so I still don't know all the details of it, for an application I need to install pygame, however it doesn't matter what I do it always with the error in the installation (I was first using pycharm, but as it didn't work I tried to install directly on cmd)
error (CMD):
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\setup.py'"'"'; file='"'"'C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\pedro\AppData\Local\Temp\pip-pip-egg-info-w13ny5_t'
cwd: C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Error (Pycharm):
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\setup.py'"'"'; file='"'"'C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\pedro\AppData\Local\Temp\pip-pip-egg-info-bcdvahlg'
cwd: C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\pedro\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
To install pygame on Windows in PyCharm:
Go to the Terminal tab near to bottom of the screen in PyCharm
pip install pygame==2.0.0.dev14
Related
I've been getting this error for a few weeks now. Sometimes package installs go perfectly, but other times I get an error. For example I tried installing Pygame today (Apologies, the error is pretty long):
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\owner\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\owner\\AppData\\Local\\Temp\\pip-install-y965ak00\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\owner\\AppData\\Local\\Temp\\pip-install-y965ak00\\pygame\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\owner\AppData\Local\Temp\pip-pip-egg-info-07wtjukl'
cwd: C:\Users\owner\AppData\Local\Temp\pip-install-y965ak00\pygame\
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\owner\AppData\Local\Temp\pip-install-y965ak00\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\owner\AppData\Local\Temp\pip-install-y965ak00\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\owner\AppData\Local\Temp\pip-install-y965ak00\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\owner\AppData\Local\Temp\pip-install-y965ak00\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I read a few suggestions like pip(3) install setuptools Which said Requirement already satisfied: setuptools in c:\users\owner\appdata\local\programs\python\python39\lib\site-packages (50.3.2) I also tried pip install --upgrade pip Which said Requirement already up-to-date: pip in c:\users\owner\appdata\local\programs\python\python39\lib\site-packages (20.2.4)
Neither of those solved the problem. I'm running Windows 10 if that matters. Any suggestion would be greatly appreciated.
I think it is because pygame has not yet released an update for your python version. Pygame has "pre" versions.
pip install pygame --pre
This question already has answers here:
Unable to install pygame on Python via pip (Windows 10)
(6 answers)
Closed 2 years ago.
I am trying to install pygame on windows 10 using pip. I am using python 3. I keep getting this error when I run pip install pygame:
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\aarav\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aarav\\AppData\\Local\\Temp\\pip-install-4b04m745\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\aarav\\AppData\\Local\\Temp\\pip-install-4b04m745\\pygame\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\aarav\AppData\Local\Temp\pip-pip-egg-info-up4741kz'
cwd: C:\Users\aarav\AppData\Local\Temp\pip-install-4b04m745\pygame\
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\aarav\AppData\Local\Temp\pip-install-4b04m745\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\aarav\AppData\Local\Temp\pip-install-4b04m745\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\aarav\AppData\Local\Temp\pip-install-4b04m745\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\aarav\AppData\Local\Temp\pip-install-4b04m745\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Does anyone have a suggestion on how I can fix this?
From your error logs, you're using Python 3.9. The current Pygame release, 1.9.6 doesn't support Python 3.9. You have several options:
Install and use Python 3.8, then pip install pygame should work.
Install the Pygame 2 development version, pip install pygame==2.0.0.dev14, or pip install pygame --pre to obtain the latest pre-release version.
Try a third party pygame wheel from Christoph Gohlke, he offers pygame 1.9.6 linked against cpython39.
This question already has answers here:
When I try to install pygame using python 3.9 I get an error windows
(2 answers)
Closed 2 years ago.
hello guys I have been trying to install pygame but whenever I do I get this error message and I have tried many solutions from YouTube unfortunately none of them worked, in fact I have tried installing sql and many other libraries but had the same error please help.
C:\Users\pCd>pip install pygame
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1: command: 'c:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pCd\\AppData\\Local\\Temp\\pip-install-i9uohpid\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\pCd\\AppData\\Local\\Temp\\pip-install-i9uohpid\\pygame\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\pCd\AppData\Local\Temp\pip-pip-egg-info-n48e7goc'
cwd: C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\setup.py", line 194, in <module> buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\buildconfig\config.py", line 210, in main deps = CFG.main(**kwds)
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\buildconfig\config_win.py", line 576, in main and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask reply = raw_input(
EOFError: EOF when reading a line
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I finally got a way how to fix this issue. basically you all just to uninstall python completely and re-install it but with version 3.6
you all can download it using this URL: https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe
when I try to use pip from cmd, it does this:
C:\Users\user1>python -m pip install pygame
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\user1\AppData\Local\Programs\Python\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-noqt88le\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-noqt88le\\pygame\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\user1\AppData\Local\Temp\pip-pip-egg-info-xj2gjez_'
cwd: C:\Users\user1\AppData\Local\Temp\pip-install-noqt88le\pygame\
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\user1\AppData\Local\Temp\pip-install-noqt88le\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\user1\AppData\Local\Temp\pip-install-noqt88le\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\user1\AppData\Local\Temp\pip-install-noqt88le\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\user1\AppData\Local\Temp\pip-install-noqt88le\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Does anybody know how to fix it, I don't even know what it means!! thanks so much!
Following this, you should be able to solve it by just:
pip install --upgrade setuptools
Months ago I encountered the same problem, and I "solved" by using virtual environments, which can be created using
python -m venv {NAME OF ENVIRONMENT}
The virtual env will act like a new python installation - so installing it again should also solve your problem.
Good luck! Anything we are here.
Using cached pycopy-xml.etree.ElementTree-0.1.2.tar.gz (1.9 kB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'F:\Python\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'"'"'; __file__='"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\hp\AppData\Local\Temp\pip-pip-egg-info-ncg_nv94'
cwd: C:\Users\hp\AppData\Local\Temp\pycharm-packaging\pycopy-xml-etree-elementtree\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hp\AppData\Local\Programs\Python\Python37-32\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
No, you don't need to install py-xml: the ElementTree API is part of the standard library of Python
here
In fact, py-xml is an old and probably obsolete package whose installation script appears to be only compatible with Python 2. One more reason why you don't need to install it!
If you would have just put the import statement in your code it would have worked without any issue in that regard.