installing pygame ERROR: Command errored out with exit status 1 [duplicate] - python

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

Related

Error when installing Python packages with pip:

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

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output [duplicate]

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.

Error on install Pygame(3.9) install (Win10) [duplicate]

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

when i run pip from cmd on python 3.9 i just installed on windows 10, it gives a wierd error and stops

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.

I'm getting an error when installing pyejabberd with pip [duplicate]

This question already has answers here:
Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?
(22 answers)
Closed 2 years ago.
I'm trying to install pyejabberd (https://pypi.org/project/pyejabberd/) but am receiving an error when using py -3 -m pip install pyejabberd.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Full error below:
Collecting pyejabberd
Using cached https://files.pythonhosted.org/packages/15/f4/658ade66dbaf4db6484ba81f6c1015b6ff653debcee3310c52e3d0a17641/pyejabberd-0.2.11-py2.py3-none-any.whl
Collecting enum34==1.1.2 (from pyejabberd)
Using cached https://files.pythonhosted.org/packages/6f/e9/08fd439384b7e3d613e75a6c8236b8e64d90c47d23413493b38d4229a9a5/enum34-1.1.2.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER\AppData\Local\Programs\Python\Python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-_217wclq\\enum34\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-_217wclq\\enum34\\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 pip-egg-info
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-_217wclq\enum34\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\site-packages\setuptools\__init__.py", line 6, in <module>
import distutils.core
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 16, in <module>
from distutils.dist import Distribution
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 9, in <module>
import re
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
First make sure your currently installed version of Python using python -V. You must check "pyejabberd" documentation, its compatible with python 2.6, 2.7, 3.3, 3.4 versions.

Categories