# Python Bindings for Raylib 3.7 New CFFI API static bindings. Faster, fewer bugs and easier to maintain than ctypes. ### Advert [RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games. # Install ## Option 1: Install from Pypi (easiest but may not be up to date or be available for your platform) We distribute a statically linked binary Raylib library, install from Pypi. pip3 install raylib==3.5.0 Some platforms that should be available: **Windows 10 (64 bit): Python 3.6 - 3.8** **MacOS: Python 3.6 - 3.8** **Linux (Ubuntu 16.04+): Python 3.6 - 3.9** If yours isn't available then pip should attempt to build from source, so you will need to have raylib development libs installed. ## Option 2: Build from source If you're using a platform we don't have binary builds for yet then you can either *use the dynamic binding with your own dll* or else you will have to build from source. If you do build on a new platform please submit your binaries as a PR. These instructions have been tested on Ubuntu 20.10 and 16.04. Mac should be very similar. Windows is probably different. Clone this repo including submodules so you get correct version of Raylib. git clone --recurse-submodules https://github.com/electronstudio/raylib-python-cffi Build and install Raylib from the raylib-c directory. cd raylib-python-cffi/raylib-c mkdir build cd build ccmake -DWITH_PIC=on -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release .. sudo make install Make a patched version of raylib header. (Not necessary if you've already got raylib_modifed.h from repo and haven't changed anything.) cd ../../raylib cp raylib.h raylib_modified.h patch -p0