Error when running prereqs file for ubuntu


I am going through the guide for setting up the build environment for linux/ubuntu. And I get an error regarding pygame when I run the script /…

I am not able to install pygame using pip either. Does anyone have any clue to what I might be missing?



Hardware: Nvidia Jetson Nano
Software: Ubuntu 18.04


Collecting pygame

Using cached pygame-2.0.1.tar.gz (5.5 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-fgwv7W/pygame/’"’"’; file=’"’"’/tmp/pip-install-fgwv7W/pygame/’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ egg_info --egg-base /tmp/pip-pip-egg-info-_Pj2qA
cwd: /tmp/pip-install-fgwv7W/pygame/
Complete output (29 lines):

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

sh: 1: sdl2-config: not found
sh: 1: sdl2-config: not found
sh: 1: sdl2-config: not found

Hunting dependencies...

For help with compilation see:
To contribute to pygame development see:

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

ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output.


After installing the dependencies found here: it worked.

1 Like