Moosems $ brew install fltk
Warning: fltk 1.3.9 is already installed and up-to-date.
To reinstall 1.3.9, run:
brew reinstall fltk
Moosems $ pip3 install pyfltk --break-system-packages
Collecting pyfltk
Using cached pyFltk-1.3.9.tar.gz (587 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyfltk
Building wheel for pyfltk (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Building for Mac OS X
i386 CPU variant detected
['./src', './contrib', '/usr/include']
Checking FLTK configuration ...
Checking fltk-config using FLTK_HOME
Checking fltk-config using default installation
Using FLTK: ['1.3.9\n']
fltk-config includes: ['/usr/local/Cellar/fltk/1.3.9/include']
fltk-config link paths: ['/usr/local/Cellar/fltk/1.3.9/lib']
fltk-config link libraries: ['fltk_images', 'png', 'z', 'jpeg', 'fltk_gl', 'fltk_forms', 'fltk', 'pthread']
FLTK was configured with multi-threading support!
FLTK was configured with OpenGL support!
FLTK was configured with Forms support!
done
clang: error: no such file or directory: './fltk/fltk_wrap.cpp'
clang: error: no input files
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyfltk
Running setup.py clean for pyfltk
Failed to build pyfltk
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyfltk)
I installed fltk just moments before.
On Mon, Jul 15, 2024 at 6:49 PM Moosems moosems@users.sourceforge.net wrote:
I think I know why this may have failed. If you look at the pypi
download files here
https://pypi.org/project/pyFltk/#files
you will see that we only have a built package for Python 3.9 on arm64
based macs. So issuing "pip3 install pyfltk" downloaded the source
package instead since you probably have a different version of python.
In this case, you will need to build it yourself from source or
install python 3.9 with "brew install python@3.9". Here are the
instructions to build it from source.
brew install fltk
brew install python-setuptools
brew install swig
pip3 install wheel
Download the source from
https://sourceforge.net/projects/pyfltk/files/pyfltk/pyFltk-1.3.9/pyFltk-1.3.9.tar.gz
tar -xzf pyFltk-1.3.9.tar.gz
cd pyFltk-1.3.9/
python3 setup.py swig
python3 setup.py build
python3 setup.py bdist_wheel
cd dist
pip3 install pyFltk-1.3.9-.....whl
Let me know if this works for you. When I am able to get my hands on a
mac, then I will upload more pre-built packages.
Related
Bugs: #27
Unfortunately that did not work for me. I got the install, opened it up, and then build failed.
Do you have swig installed? To build from the source distribution you will need swig, once that is installed, please try:
python3 setup.py swig build
If this does not solve your problem, please show the swig version you are using and the output of:
python3 setup.py swig
brew listshows swig as installed (I installed it as I followed your steps line by line so its the newest version as well).python3 setup.py swig buildgives the following:Running
python3 setup.py swiggives the following:Could you please show the output of:
swig -version
Ok, I think I know what your problem is. It seems that the changes for swig V4.2 did not actually make it into the tarball of pyFltk1.3.9. Either you have to install swig V4.1 or older or you have to get the pyFltk sources from sf.net. Sorry about that, we will try to create a new tarball as son as possible, but this will definitely take a few days.