-
Notifications
You must be signed in to change notification settings - Fork 28
Install
Daniyal Ansari edited this page Apr 15, 2019
·
3 revisions
To run pygame-based programs you need to install pygame on your BeagleBone. (This is different than installing pygame/python on your PC). The steps for this are below.
Paste the following block of code into your shell and enter.
# Install required libsdl
sudo apt install libsdl1.2-dev -y
# Clone PyGame github repository
git clone https://github.com/pygame/pygame
# Move to pygame directory
cd pygame
# Build and Install PyGame
sudo python3 setup.py install
Run python3 -c "import pygame"
.
Your installation was successful if you get an output similar to:
debian@scuttle:~$ python3 -c "import pygame"
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Another way to test your installation of pygame:
Run python3
.
Type import pygame
.
Your installation was successful if you get an output similar to:
debian@scuttle:~$ python3
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame 2.0.0.dev0
Hello from the pygame community. https://www.pygame.org/contribute.html
>>>