Python wrapper for the Fast Light Toolkit pyFLTK

SourceRPILinuxMacosWindows

Installation:

Windows

Windows install

Preferred install method is to use pip to install pyFltk from PyPi

First install Python

  1. Download the latest 64-bit Python installer for Windows 10 from https://www.python.org/downloads/windows/
  2. After downloading Python, right click the .exe file and choose Run as Administrator
  3. Check the Add Python to PATH box
  4. Click Custom Installation
  5. Click Install for all users

Next install pyFltk

  1. Open a command prompt (search "cmd") or Powershell
  2. Type the command: pip install pyfltk

As a convenience we have also provided the wheel files on Sourceforge

MacOS

These instructions have been tested on Intel macs. M1 hardware has not been tested yet. If you are successful please let us know if it installs on newer M1 Macs

  1. Download and install the latest Python installer for MacOS https://www.python.org/downloads/macos/
  2. From Utilities launch a Terminal and run the command xcode-select --install
  3. Goto the Brew.sh website and follow instructions to install the Homebrew package manager
  4. Install C++ FLTK, in a terminal run the command brew install fltk
  5. Install pyFltk, in a terminal run the command pip3 install pyfltk

Linux

Installing on Ubuntu/Debian Linux using precompiled binary packages

For Debian 12 or Ubuntu 22.04 or newer run the command:

  1. sudo apt install python3-fltk

For Debian 11 or Ubuntu 20.04:

  1. Download the correct .deb package from https://sourceforge.net/projects/pyfltk/files/pyfltk/pyFltk-1.3.8/
  2. In a terminal run the command: sudo apt install libfltk*1.3
  3. In a terminal, where you downloaded the .deb package, run the command: sudo dpkg -i pyFltk-1.3.8_*_amd64.deb

Raspberry Pi OS

Installing on Raspberry Pi OS using precompiled binary package

  1. Download the rpi armhf .deb package from https://sourceforge.net/projects/pyfltk/files/pyfltk/pyFltk-1.3.7/
  2. In a terminal run the command: sudo apt install libfltk*1.3 python3-opengl
  3. In a terminal, where you downloaded the .deb package, run the command: sudo dpkg -i pyFltk-1.3.7-1_rpi_bullseye_armhf.deb
  4. An alternative to the previous step is to simply install using pip, with the command: sudo pip3 install pyfltk

Arch Linux: pyFltk is packaged by Clemmitt Sigler in the AUR (Arch User Repository)

Building pyFltk from latest source code on Debian/Ubuntu:

  1. sudo apt update
  2. sudo apt install libfltk1.3-dev g++ python3-dev python3-setuptools subversion swig
  3. svn checkout https://svn.code.sf.net/p/pyfltk/code/trunk pyfltk-code
  4. cd pyfltk-code/pyfltk/
  5. python3 setup.py swig
  6. python3 setup.py build
  7. sudo python3 setup.py install