Installation:
pyFLTK
Prior to installation of pyFLTK, you need to install FLTK. Installation of pyFLTK is now done using the distutils extension. Change to the directory where you unpacked pyFLTK. There is a script calledsetup.py
that can be
executed in the standard way:
python setup.py build install
This should take care of the installation on Linux platforms. For other platforms try the above. If this does not work you should edit thesetup.py
script and add an entry describing your local installation. In that case
I would love to hear from you.
Installation using MinGW
See here for a brief description of the installation procedure using the MinGW compiler on Windows.Installation on Mac OS X
This section is brought to you by courtesy of Marc-Antoine Parent:You might be happy to know I got PyFLTK to run on Mac OS X. There were a few issues:I hope to be able to add full Mac OS X support for the next release!
- FLTK itself. (Builds easily; I used 1.1.4)
- Adding 'darwin' as a supported platform, alongside linux.
- A weird bug that seems to have to do with the order in which includes are called...
#include "Python.h" itself includes <Carbon/Carbon.h> on our platform, but in a way that makes it fail. The trick is to include the latter before the former. (in fltk_wrap.cxx) You could make it conditional to #ifdef __APPLE__ and all would be fine on all platforms.- Our platform does not have Fl::free_color. I just commented out the line that calls it, and it seems to work adequately. Again, you could hide it in #ifndef __APPLE__
- The build... many things come to us not as libraries but frameworks. For example OpenGL. So passing GL as a library does not work. I linked by hand, removing '-lGL' and adding '-framework Carbon -framework OpenGL -framework AGL' Also, the average OSX install will not have libpng or libjpg. I installed them from fink (a package manager), and had to tell the linker where to get them (-L/sw/lib)
There must be a better way to do this; but I am new to Python and the distribution tools... Still, I hope this information was useful to you.
pyFLTK2
Prior to installation of pyFLTK2, you need to install FLTK2 in a directory of your choice. Set the environment variable FLTK2_HOME to the directory where you installed FLTK2. Installation of pyFLTK is now done using the distutils extension. Change to the directory where you unpacked pyFLTK and further change to the directorypython2
. There is a script called setup.py
that can be
executed in the standard way:
python setup.py -install
This should take care of the installation on Windows and Linux platforms. For other platforms you should edit thesetup.py
script and add an entry describing your local installation.