1

Iam trying to install latest version of pygame to run it on python 3 but when I type this in terminal

sudo pip3 install pygame==2.0.1

I get the following error

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting pygame==2.0.1 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-f2aop58i/pygame_f50a3b4ef6f34184b95da3eb41799e8f/setup.py'"'"'; _file='"'"'/tmp/pip-install-f2aop58i/pygame_f50a3b4ef6f34184b95da3eb41799e8f/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-73xjipr cwd: /tmp/pip-install-f2aop58i/pygame_f50a3b4ef6f34184b95da3eb41799e8f/ Complete output (31 lines): WARNING, No "Setup" File Exists, Running "buildconfig/config.py" Using UNIX configuration... WARNING:root:Some pygame dependencies were not found. Pygame can still compile and install, but games that depend on those missing dependencies will not run. Use -auto to continue building without all dependencies. Missing dependencies Hunting dependencies... SDL : found 2.0.14 FONT : found IMAGE : not found IMAGE SDL_image.h libSDL2_image.so ['/usr/include', '/usr/include/SDL2', '/usr/local/include', '/usr/local/include/SDL2', '/usr/X11R6/include', '/usr/include/SDL2'] ['/usr/lib', '/usr/lib64', '/usr/X11R6/lib', '/usr/lib/i386-linux-gnu', '/usr/lib/x86_64-linux-gnu', '/usr/lib/arm-linux-gnueabihf/', '/usr/lib/aarch64-linux-gnu/', '/usr/local/lib', '/usr/local/lib64', '/usr/local/X11R6/lib', '/usr/local/lib/i386-linux-gnu', '/usr/local/lib/x86_64-linux-gnu', '/usr/local/lib/arm-linux-gnueabihf/', '/usr/local/lib/aarch64-linux-gnu/'] MIXER : not found MIXER SDL_mixer.h libSDL2_mixer.so ['/usr/include', '/usr/include/SDL2', '/usr/local/include', '/usr/local/include/SDL2', '/usr/X11R6/include', '/usr/include/SDL2'] ['/usr/lib', '/usr/lib64', '/usr/X11R6/lib', '/usr/lib/i386-linux-gnu', '/usr/lib/x86_64-linux-gnu', '/usr/lib/arm-linux-gnueabihf/', '/usr/lib/aarch64-linux-gnu/', '/usr/local/lib', '/usr/local/lib64', '/usr/local/X11R6/lib', '/usr/local/lib/i386-linux-gnu', '/usr/local/lib/x86_64-linux-gnu', '/usr/local/lib/arm-linux-gnueabihf/', '/usr/local/lib/aarch64-linux-gnu/'] PNG : found JPEG : found SCRAP : found PORTMIDI: not found PORTMIDI portmidi.h libportmidi.so ['/usr/include', '/usr/include/SDL2', '/usr/local/include', '/usr/local/include/SDL2', '/usr/X11R6/include', '/usr/include/SDL2'] ['/usr/lib', '/usr/lib64', '/usr/X11R6/lib', '/usr/lib/i386-linux-gnu', '/usr/lib/x86_64-linux-gnu', '/usr/lib/arm-linux-gnueabihf/', '/usr/lib/aarch64-linux-gnu/', '/usr/local/lib', '/usr/local/lib64', '/usr/local/X11R6/lib', '/usr/local/lib/i386-linux-gnu', '/usr/local/lib/x86_64-linux-gnu', '/usr/local/lib/arm-linux-gnueabihf/', '/usr/local/lib/aarch64-linux-gnu/'] PORTTIME: not found PORTTIME porttime.h libporttime.so ['/usr/include', '/usr/include/SDL2', '/usr/local/include', '/usr/local/include/SDL2', '/usr/X11R6/include', '/usr/include/SDL2'] ['/usr/lib', '/usr/lib64', '/usr/X11R6/lib', '/usr/lib/i386-linux-gnu', '/usr/lib/x86_64-linux-gnu', '/usr/lib/arm-linux-gnueabihf/', '/usr/lib/aarch64-linux-gnu/', '/usr/local/lib', '/usr/local/lib64', '/usr/local/X11R6/lib', '/usr/local/lib/i386-linux-gnu', '/usr/local/lib/x86_64-linux-gnu', '/usr/local/lib/arm-linux-gnueabihf/', '/usr/local/lib/aarch64-linux-gnu/'] FREETYPE: found 23.4.17 --- For help with compilation see: https://www.pygame.org/wiki/Compilation To contribute to pygame development see: https://www.pygame.org/contribute.html --- ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/c7/b8/06e02c7cca7aec915839927a9aa19f749ac17a3d2bb2610b945d2de0aa96/pygame-2.0.1.tar.gz#sha256=8b1e7b63f47aafcdd8849933b206778747ef1802bd3d526aca45ed77141e4001 (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement pygame==2.0.1 ERROR: No matching distribution found for pygame==2.0.1 

It gets downloaded but after the downloading is finished it throws the above error Any help would be greatly appreciated PS: I tried to upgrade pip , tried to install a different version(2.0.0),tried to install it in virtual environment. nothing worked and showed the above error

2
  • Latest version is 2.3.0 why are you trying 2.0.1? pygame.org/news Commented Mar 22, 2023 at 17:02
  • thank you. I was using 2.0.1 earlier so I tried to install the same version. I have now installed the latest and it installed just fine. Thanks for pointing it out Commented Mar 23, 2023 at 3:39

1 Answer 1

1

As of 23/3/2023 the latest version of pygame is 2.3.0

https://www.pygame.org/news

It seems that solved the issue.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.