I tried to install PyGame on jetson nano, even though I spent hours on it, it failed :
1.
sudo apt-get install python3-pygame
failed due to the package is not included in the os.
2.
pip install pygame --user
failed as well.
Thanks
I tried to install PyGame on jetson nano, even though I spent hours on it, it failed :
1.
sudo apt-get install python3-pygame
failed due to the package is not included in the os.
2.
pip install pygame --user
failed as well.
Thanks
Whatβs the error show when install.
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: /usr/bin/python3 -c βimport sys, setuptools, tokenize; sys.argv[0] = β"β"β/tmp/pip-install-k4jvmk9f/pygame/setup.pyββ'ββ; file=ββ'ββ/tmp/pip-install-k4jvmk9f/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 pip-egg-info
cwd: /tmp/pip-install-k4jvmk9f/pygame/
Complete output (12 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
Hunting dependencies...
WARNING: "sdl-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You need to install libsdl1.2-dev for sdl-config error
sudo apt install libsdl1.2-dev
Thanks! new error nowβ¦
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c βimport sys, setuptools, tokenize; sys.argv[0] = β"β"β/tmp/pip-install-54qtayvc/pygame/setup.pyββ'ββ; file=ββ'ββ/tmp/pip-install-54qtayvc/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 pip-egg-info
cwd: /tmp/pip-install-54qtayvc/pygame/
Complete output (18 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
Hunting dependencies...
SDL : found 1.2.15
FONT : not found
IMAGE : not found
MIXER : not found
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: found 21.0.15
Missing dependencies
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev
This helped a lot. But I needed one more lib:
sudo apt-get install libfreetype6-dev
thanks for this, was very helpfull
For them who might find it interesting, some updates to install pygame 2.0.0 on Jetpack 4.5.1, Python3 on Jetson Nano:
An βimport pygameβ is executed successfully.
regards, Peter
Unfortunately the victory was too early:
βpygame.error: No available video deviceβ
on line βself.display = pygame.display.set_mode((self.w, self.h))β. Any suggestions?