This is the error I get when I try to download pygame.
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-hkauem4n\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-hkauem4n\\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\user\AppData\Local\Temp\pip-pip-egg-info-k1_a0_dp'
cwd: C:\Users\user\AppData\Local\Temp\pip-install-hkauem4n\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\user\AppData\Local\Temp\pip-install-hkauem4n\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\user\AppData\Local\Temp\pip-install-hkauem4n\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\user\AppData\Local\Temp\pip-install-hkauem4n\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\user\AppData\Local\Temp\pip-install-hkauem4n\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.
Can't find an answer anywhere to this problem, can someone help me, please?
I was having the same issue a while ago. You have to download visual studio c++ build tools to download pygame.
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
Go there and scroll down until you see Build Tools for Visual Studio 2019 and download that. Then run "pip install pygame" and it should work.
Related
I've tried lots of different ways of installing pygame and none work it always comes up with an error message.
I need this module for a game: I'm trying to make a multiplayer game for a project for school and online told me to use this module.
Any help would be great!! Also I've never put a question on here before so hope I'm doing it right! Thanks
C:\Users\RDSTw>py -m pip install pygame==2.0.0.dev6
Collecting pygame==2.0.0.dev6
Using cached pygame-2.0.0.dev6.tar.gz (3.7 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RDSTw\\AppData\\Local\\Temp\\pip-install-lgh1zxp0\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\RDSTw\\AppData\\Local\\Temp\\pip-install-lgh1zxp0\\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\RDSTw\AppData\Local\Temp\pip-pip-egg-info-ov5fgttm'
cwd: C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\
Complete output (31 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\setup.py", line 258, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\buildconfig\config.py", line 208, in main
deps = CFG.main(**kwds)
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\buildconfig\config_win.py", line 559, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\buildconfig\download_win_prebuilt.py", line 269, in ask
update(x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\buildconfig\download_win_prebuilt.py", line 252, in update
download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\buildconfig\download_win_prebuilt.py", line 101, in download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\Users\RDSTw\AppData\Local\Temp\pip-install-lgh1zxp0\pygame\buildconfig\download_win_prebuilt.py", line 17, in download_sha1_unzip
import requests
ModuleNotFoundError: No module named 'requests'
Making dir :prebuilt_downloads:
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
This says that you don't have the requests module installed. So first install requests using pip install -U requests and then again install pygame. I also did it this way.
This question already has answers here:
Unable to install pygame on Python via pip (Windows 10)
(6 answers)
Closed 2 years ago.
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py'"'"'; file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\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\DELL\AppData\Local\Temp\pip-pip-egg-info-m8a9tj8v'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\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\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\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: pip install pygame==2.0.0.dev14
On Mac OS and Linux: pip3 install pygame==2.0.0.dev14
I'm attempting to install nim into a folder where I'm experimenting using virtual environment, but I can't seem to install nim using pip install nim. Any ideas why, I've included the error message. Thank you! :)
Collecting nim
Using cached nim-0.1.0.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/setup.py'"'"'; __file__='"'"'/private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/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 /private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-pip-egg-info-lhsvapoi
cwd: /private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/setup.py", line 171, in <module>
pkg_data = _package_data(__file__.replace('setup.py', '__init__.py'))
File "/private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/setup.py", line 150, in _package_data
data = literal_eval(u''.join(lines))
File "/private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/setup.py", line 122, in literal_eval
return _convert(node_or_string)
File "/private/var/folders/jq/_5zq1xh91hgcj49vb9lh689h0000gn/T/pip-install-c6r0gd5_/nim/setup.py", line 69, in _convert
if isinstance(node, (Str, Bytes)):
NameError: name 'Str' is not defined
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
When I try pip install logpy those errors appear. How can I fix it? Thanks so much!
ERROR: Command errored out with exit status 1:
command: 'c:\users\tran quoc bao\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TRANQU~1\\AppData\\Local\\Temp\\pip-install-gs_uzbje\\logpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\TRANQU~1\\AppData\\Local\\Temp\\pip-install-gs_uzbje\\logpy\\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\TRANQU~1\AppData\Local\Temp\pip-install-gs_uzbje\logpy\pip-egg-info'
cwd: C:\Users\TRANQU~1\AppData\Local\Temp\pip-install-gs_uzbje\logpy\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\TRANQU~1\AppData\Local\Temp\pip-install-gs_uzbje\logpy\setup.py", line 6, in <module>
long_description = open('README.rst').read(),
FileNotFoundError: [Errno 2] No such file or directory: 'README.rst'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The last time this module was updated was in 2012. There's an issue from 2016 that reports the problem you mentioned. Take aways:
The package is broken. This particular error can be easily fixed by cloning the repository and adding README.rst. I'd not go this way, as most likely there are more issues. It's hard to say how it would work with modern Python.
The module provides "logging alternative" to logging module. If you don't like the vanilla version, try loguru, enjoyable logging in Python.
I'm installing package python-weka-wrapper. But i have a problem with that about Java Development Kit.
This is for python 3.7.4 on windows 10.
C:\Users\dell>pip install python-weka-wrapper3
Collecting python-weka-wrapper3
Using cached https://files.pythonhosted.org/packages/48/3a/0f345b19774b5b6c53e9456c2985d79ff09b610bbf29d95403004734a45b/python-weka-wrapper3-0.1.7.tar.gz
Collecting javabridge>=1.0.14
Using cached https://files.pythonhosted.org/packages/a6/a0/c59bccabed99b1d4ac68166c59c679b375bfca75b78688b52c541b711578/javabridge-1.0.18.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-4r0otofz\\javabridge\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-4r0otofz\\javabridge\\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\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\pip-egg-info'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\setup.py", line 402, in <module>
ext_modules=ext_modules(),
File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\setup.py", line 96, in ext_modules
jdk_home = find_jdk()
File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\javabridge\locate.py", line 203, in find_jdk
"Failed to find the Java Development Kit. "
RuntimeError: Failed to find the Java Development Kit. Please download and install the Oracle JDK 1.6 or later
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Althought I've installed JDK1.8.0_231
So how to fix the error? Thank you!
You have checked and found the Java runtime Environment (JRE), not the Java development Kit, which is a seperate installation.
You can find it on the oracle website. Download and install and then your problem should be solved