Python Forum
(HELP GREATLY APPRECIATED) New user- Huge Pygame Installation Problem!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(HELP GREATLY APPRECIATED) New user- Huge Pygame Installation Problem!
#1
Hey all Python Enthusiasts!
I recently obtained the Python Crashcourse and am working through the book. I now need to install Pygame for the first big project in this Godsend of a book. Don't worry, I'm not going to just throw my problem out there and wait for someone to solve it for me. You can rest assured I have done my research, dedicated much time to -attempting- to solve it, and have now come to you as a last resort. Here's the problem:

I have two versions of Python on my Linux Chromebook. Python 2.7.13 and Python 3.5.3. I have installed Pip as well. When I enter the command "python3 -m pip install -U pygame --user" an error appears. When I enter the command "python3 -m pip install --user pygame" the same error appears. For context, the second command is from The Python Crashcourse and the first command is from "https://ukdevguy.com/how-to-install-pygame-in-2019/". Here is the error:

"

DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pygame
Using cached pygame-2.0.1.tar.gz (5.5 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/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 /tmp/pip-pip-egg-info-7h2olhgr
cwd: /tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/
Complete output (29 lines):


WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...

/bin/sh: 1: sdl2-config: not found
/bin/sh: 1: sdl2-config: not found
/bin/sh: 1: sdl2-config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/setup.py", line 318, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/buildconfig/config.py", line 221, in main
deps = CFG.main(**kwds)
File "/tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/buildconfig/config_unix.py", line 194, in main
DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
File "/tmp/pip-install-q2tgkbgf/pygame_817bade74b394020ad397291f1dae3bc/buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
IndexError: list index out of range

Hunting dependencies...
---
For help with compilation see:
https://www.pygame.org/wiki/CompileDebian
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.

"

From reading that error, It seems I need to create a "Setup File". Although, I have no idea what that is and how I can create it. Have you had the same problem, do you know how to solve it, or anything along those lines?

Greatly appreciated,

Jbomb
Reply
#2
As the message indicates, your python version Python 3.5 is too old and is not supported. You need uninstall it and install a newer version.
metulburr likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pygame installation problems Gheryk 5 8,602 Nov-29-2023, 08:49 PM
Last Post: E_Mohamed
  Problem with pygame.event.clear qq12346 1 2,106 Oct-05-2023, 08:39 AM
Last Post: patriciainman
  pygame double jump problem Yegor123 3 2,572 May-02-2023, 09:34 PM
Last Post: sudoku6
  problem with pygame Aladdin 3 4,207 Jun-25-2020, 01:41 PM
Last Post: Aladdin
  [PyGame] Game boss causing huge slowdown michael1789 21 7,325 Mar-09-2020, 02:07 AM
Last Post: michael1789
  Problem with music - Pygame.error GaseBall 1 3,197 Nov-28-2019, 07:46 PM
Last Post: SheeppOSU
  [PyGame] Rotation Problem in PyGame thunderbird028 1 2,697 Nov-14-2019, 06:49 AM
Last Post: Windspar
  PyQt5 -ALONG the pygame libraries to get username or user to use on scoreboard... ??? lsepolis123 1 2,339 Jul-31-2019, 04:11 PM
Last Post: Windspar
  My Pygame Project's Problem **huh** osmanb06 2 3,663 Nov-06-2018, 09:27 AM
Last Post: osmanb06
  Coding problem in a Pygame Sghet 4 8,023 Aug-13-2018, 05:39 PM
Last Post: MTGReen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020