Installation:
Windows
Windows install
Preferred install method is to use pip to install pyFltk from PyPi
First install Python
- Download the latest 64-bit Python installer for Windows 10 from https://www.python.org/downloads/windows/
- After downloading Python, right click the .exe file and choose Run as Administrator
- Check the Add Python to PATH box
- Click Custom Installation
- Click Install for all users
Next install pyFltk
- Open a command prompt (search "cmd") or Powershell
- 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
- Download and install the latest Python installer for MacOS https://www.python.org/downloads/macos/
- From Utilities launch a Terminal and run the command
xcode-select --install
- Goto the Brew.sh website and follow instructions to install the Homebrew package manager
- Install C++ FLTK, in a terminal run the command
brew install fltk
- 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:
sudo apt install python3-fltk
For Debian 11 or Ubuntu 20.04:
- Download the correct .deb package from https://sourceforge.net/projects/pyfltk/files/pyfltk/pyFltk-1.3.8/
- In a terminal run the command:
sudo apt install libfltk*1.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
- Download the rpi armhf .deb package from https://sourceforge.net/projects/pyfltk/files/pyfltk/pyFltk-1.3.7/
- In a terminal run the command:
sudo apt install libfltk*1.3 python3-opengl
- In a terminal, where you downloaded the .deb package, run the command:
sudo dpkg -i pyFltk-1.3.7-1_rpi_bullseye_armhf.deb
- 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)
- Download pyFltk from the AUR
- Follow the instructions for installing packages from the AUR
Building pyFltk from latest source code on Debian/Ubuntu:
- sudo apt update
- sudo apt install libfltk1.3-dev g++ python3-dev python3-setuptools subversion swig
- svn checkout https://svn.code.sf.net/p/pyfltk/code/trunk pyfltk-code
- cd pyfltk-code/pyfltk/
- python3 setup.py swig
- python3 setup.py build
- sudo python3 setup.py install