macOS
Install pyFltk for macOS
Easy method using pip3
- Goto Finder -> Applications -> Utilities. Then launch Terminal app
- Install command line tools by typing the following command into your terminal
xcode-select --install
- Open a browser and goto brew.sh website
- Install the Homebrew package manager for macOS by pasting the Install Homebrew line on the homepage into your terminal. I have also copied it below.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Once Homebrew is installed, then install the fltk package with the following command:
brew install fltk
-
Currently MacOS ships with Python version 2. So you will need to download and install the latest Python 3 64-bit installer from
python.org website.
-
Finally, install pyFltk with the following command:
pip3 install pyfltk
- To test installation, open a new terminal, run the python interpreter and issue the command import fltk inside the python interpreter. If you get no errors then it was successful.
Alternate manual install method (without pip3) after step 6 above.
- Download pyFltk-1.3.7_WithSwig.tar.gz file from Sourceforge
Get pyFltk 1.3.7
- Change to your Downloads directory
cd Downloads
Type ls to view your files
- Extract the file with the command:
tar -xzf pyFltk-1.3.7_WithSwig.tar.gz
- Then change directory
cd pyFltk-1.3.7
- Build the source code with the command:
python3 setup.py build
- Install the software with the command
sudo python3 setup.py install
You will have to type your password for it to complete.
-
To test installation, open a new terminal, run the python interpreter and issue the command import fltk inside the python interpreter. If you get no errors then it was successful.
-
Follow the instructions under MS Windows to get the documentation and demo programs. You won’t need 7-zip as it’s for Windows. You can unzip the tar.gz files with the same procedure as step 3.