Installation
The instructions are simple, if you already have a functioning Python environment on your machine.
Install SDL2 through your package manager:
Ubuntu: sudo apt install libsdl2-dev
Fedora: sudo dnf install SDL2-devel
macOS: brew install sdl2
Install PyBoy using pip install pyboy (add --user if your system asks)
Now you're ready! Either use PyBoy directly from the terminal $ pyboy file.rom or use it in your Python scripts:
from pyboy import PyBoy
pyboy = PyBoy('ROMs/gamerom.gb')
while not pyboy.tick():
pass