1
1
Raspberry Pi
2
2
====================
3
3
4
- Please use Raspberry Pi OS Bullseye. Older OSes are not tested.
4
+ Please use Raspberry Pi OS Bookworm. Bullseye should also work . Older OSes are not tested.
5
5
6
6
Option 1: Binary wheel
7
7
----------------------
@@ -10,7 +10,7 @@ We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11
10
10
11
11
::
12
12
13
- python -m pip install raylib
13
+ python -m pip install --break-system-packages raylib
14
14
15
15
If it doesn't work, or you're not on Bullseye, or you're 32 bit, or if you want to use Raylib in ``PLATFORM_DRM `` mode, you will need to compile your own raylib. See below.
16
16
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
@@ -22,6 +22,8 @@ This should work for everyone.
22
22
23
23
::
24
24
25
+ sudo apt update
26
+ sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
25
27
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
26
28
cd raylib
27
29
mkdir build
@@ -30,24 +32,24 @@ This should work for everyone.
30
32
cmake -DPLATFORM="Desktop" -DOPENGL_VERSION=2.1 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
31
33
make
32
34
sudo make install
35
+ sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
33
36
34
37
Then have pip compile and install the wheel:
35
38
36
39
::
37
40
38
- sudo apt update
39
- sudo apt install python3-pip
40
- pip3 install setuptools
41
- pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==5.0.0.2
41
+ python -m pip install --break-system-packages setuptools
42
+ python -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
42
43
43
44
Option 3: Compile Raylib from source DRM mode
44
45
---------------------------------------------
45
46
46
- As far as I can tell, Raylib DRM is broken. It doesn't work on my Pi. However, if you want to compile it and
47
- give it a go, these are the commands:
47
+ This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.
48
48
49
49
::
50
50
51
+ sudo apt update
52
+ sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
51
53
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
52
54
cd raylib
53
55
mkdir build
@@ -56,15 +58,14 @@ give it a go, these are the commands:
56
58
cmake -DPLATFORM="DRM" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
57
59
make
58
60
sudo make install
61
+ sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
59
62
60
63
Then have pip compile and install the wheel with some extra linker flags:
61
64
62
65
::
63
66
64
- sudo apt update
65
- sudo apt install python3-pip
66
- pip3 install setuptools
67
- LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==5.0.0.2
67
+ python -m pip install --break-system-packages setuptools
68
+ LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
68
69
69
70
70
71
0 commit comments