This question already has answers here:
Unable to install pygame on Python via pip (Windows 10)
(6 answers)
Error in installing Matplotlib : fatal error C1083
(4 answers)
Closed 3 years ago.
I am trying to install pygame in python 3.8, but I am having an error message I can't figure out what's wrong.
I am following a tutorial that used the command pip install pygame within the script folder after installing python, but that doesn't seem to work for me.
Any idea of what I am doing wrong or what I need to do? I am not very good with the systems around python.
C:\Users\KaspArno\AppData\Local\Programs\Python\Python38-32\Scripts>pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\kasparno\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\KaspArno\\AppData\\Local\\Temp\\pip-install-hntok19u\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\KaspArno\\AppData\\Local\\Temp\\pip-install-hntok19u\\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\KaspArno\AppData\Local\Temp\pip-install-hntok19u\pygame\pip-egg-info'
cwd: C:\Users\KaspArno\AppData\Local\Temp\pip-install-hntok19u\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-x86"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\KaspArno\AppData\Local\Temp\pip-install-hntok19u\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\KaspArno\AppData\Local\Temp\pip-install-hntok19u\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\KaspArno\AppData\Local\Temp\pip-install-hntok19u\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\KaspArno\AppData\Local\Temp\pip-install-hntok19u\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.
The issue is more likely with python 3.8, you need to compile it yourself or use an older version of python (<= 3.7).
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:
Can't install new packages for Python (Python 3.9.0, Windows 10)
(6 answers)
Unable to install pygame on Python via pip (Windows 10)
(6 answers)
Closed 2 years ago.
So I coded a game in python with pygame in pycharm. I installed pygame via pycharm, when I coded, but now as I am done coding, I want to simply open the .py file, but get an error that pygame isnt found. so I tried to install pygame with pip. Sadly I allways get following error:
ERROR: Command errored out with exit status 1:
command: 'c:\users\mattis\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mattis\\AppData\\Local\\Temp\\pip-install-56l68d_r\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mattis\\AppData\\Local\\Temp\\pip-install-56l68d_r\\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\Mattis\AppData\Local\Temp\pip-pip-egg-info-bsw9xn7u'
cwd: C:\Users\Mattis\AppData\Local\Temp\pip-install-56l68d_r\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\Mattis\AppData\Local\Temp\pip-install-56l68d_r\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\Mattis\AppData\Local\Temp\pip-install-56l68d_r\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\Mattis\AppData\Local\Temp\pip-install-56l68d_r\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\Mattis\AppData\Local\Temp\pip-install-56l68d_r\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 updated the setuptools and did some other stuff none of this worked. I then completely uninstalled Python and pip, reinstalled it, but I still get the same error message. Does somebody have an idea what is going wrong during the installation?
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
This question already has answers here:
Jnius installation bug, "Unable to determine JDK_HOME"
(3 answers)
Closed 2 years ago.
I have been trying to install pyjnius through the pip command pip install pyjnius and pip install git+git://github.com/kivy/pyjnius.git but all seem to be returning the below error code.
Collecting git+git://github.com/kivy/pyjnius.git
Cloning git://github.com/kivy/pyjnius.git to c:\temp\pip-req-build-7d_4quh2
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\pycharmprojects\kivy_project\venv\scripts\python
.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Temp\\pip-
req-build-7d_4quh2\\setup.py'"'"'; __file__='"'"'C:\\Temp\\pip-req-build-7d_4
quh2\\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:\Temp\pip-pip-egg-info-6mu1
ulvw'
cwd: C:\Temp\pip-req-build-7d_4quh2\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Temp\pip-req-build-7d_4quh2\setup.py", line 95, in <module>
compile_native_invocation_handler(*get_possible_homes(PLATFORM))
File "jnius\env.py", line 172, in get_possible_homes
get_jdk_home(platform),
File "jnius\env.py", line 142, in get_jdk_home
raise Exception('Unable to determine JDK_HOME')
Exception: Unable to determine JDK_HOME
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check
the logs for full command output.
Please any one give me a solution to this because I am kinda new to this kivy of a thing.
The error message is showing the reason it's failing:
Exception: Unable to determine JDK_HOME
Make sure you have JDK (Java Development Kit) installed. If JDK is installed and it's still not working, try setting the JDK_HOME environment variable to point to the correct location.
Here's where the error message is being thrown, for reference: https://github.com/kivy/pyjnius/blob/7dd6c8e679302526d6e86bdddeca343a3f0b54c7/jnius/env.py#L118-L144
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