Closed the-JACK-pot closed 6 months ago
in your xcode terminal try 'pip install pillow' this solved a similar problem that I was facing.
I'm a little new to Xcode so I'm not too knowledgable about a lot of its features - when you say 'Xcode terminal', do you mean a terminal that's currently executing commands in the App's folder? Or do you mean a terminal within Xcode itself? I'd love if there was a terminal in Xcode, but I've never been able to find one
@Retr0Hax894 a terminal that's currently executing commands in the App's folder
Thanks for the clarification! Unfortunately, however, it doesn't seem to have worked and outputs the same error. Thanks for your suggestion, though! Much appreciated
I don't recommend using "sudo" with the toolchain command. Most things can be done as a regular user.
Oh really? I figured sudo would have more ability when executing toolchain commands. I tried your suggestion, but it didn't work. I got a different error, and it appeared earlier in the process than the error that appeared when I used 'sudo' in the command.
Here's a snippet of the logs:
RAN: /usr/bin/patch -t -d /Users/jack/Documents/workshop/KivyBuilds/build/pillow/iphoneos-arm64/Pillow-8.2.0 -p1 -i /Users/jack/Documents/workshop/KivyBuilds/tester1/lib/python3.12/site-packages/kivy_ios/recipes/pillow/bypass-find-library.patch
STDOUT:
No file to patch. Skipping...
1 out of 1 hunks ignored--saving rejects to setup.py.rej
STDERR:
It's not building because you're missing a required package or library dependency. Another issue can be the cython version that you're using.
Oh really? I figured sudo would have more ability when executing toolchain commands. I tried your suggestion, but it didn't work. I got a different error, and it appeared earlier in the process than the error that appeared when I used 'sudo' in the command.
Here's a snippet of the logs:
RAN: /usr/bin/patch -t -d /Users/jack/Documents/workshop/KivyBuilds/build/pillow/iphoneos-arm64/Pillow-8.2.0 -p1 -i /Users/jack/Documents/workshop/KivyBuilds/tester1/lib/python3.12/site-packages/kivy_ios/recipes/pillow/bypass-find-library.patch STDOUT: No file to patch. Skipping... 1 out of 1 hunks ignored--saving rejects to setup.py.rej STDERR:
You should probably clean up your build directories if you switch from being root (via sudo) to being a regular user. Also I have had trouble in the past with cached downloads being in a bad state. If you don't want to cleanup everything, you can try:
toolchain clean pillow
If you are on an Apple with the arm chip:
toolchain build --platform iphonesimulator-arm64 pillow
for the simulator and:
toolchain build --platform iphoneos-arm64 pillow
removing my build directory and issuing the following commands worked for me:
rm -rf build
python3 -mvenv kivy_ios_env
source kivy_ios_env/bin/activate
toolchain build pillow
works for me, including all of the dependencies.
I intentionally have brew
nowhere in my path and using the python3
in /usr/bin
.
This is the resulting packages built by only specifying pillow
.
% toolchain status
audiostream - Not built
click - Not built
curly - Not built
cymunk - Not built
ffmpeg - Not built
ffpyplayer - Not built
flask - Not built
freetype - Build OK (built at 2024-04-25 21:25:41.955863)
hostopenssl - Build OK (built at 2024-04-25 21:25:53.268592)
hostpython3 - Build OK (built at 2024-04-25 21:28:29.044537)
ios - Build OK (built at 2024-04-25 21:30:04.582163)
itsdangerous - Not built
jinja2 - Not built
kivent_core - Not built
kivy - Not built
kiwisolver - Not built
libcurl - Not built
libffi - Build OK (built at 2024-04-25 21:27:01.358593)
libjpeg - Build OK (built at 2024-04-25 21:27:12.418917)
libpng - Not built
libzbar - Not built
markupsafe - Not built
materialyoucolor - Not built
matplotlib - Not built
netifaces - Not built
numpy - Not built
openssl - Build OK (built at 2024-04-25 21:27:34.086948)
photolibrary - Not built
pillow - Build OK (built at 2024-04-25 21:30:24.951624)
plyer - Not built
py3dns - Not built
pycrypto - Not built
pykka - Not built
pyobjus - Not built
python3 - Build OK (built at 2024-04-25 21:29:59.110181)
pyyaml - Not built
sdl2 - Not built
sdl2_image - Not built
sdl2_mixer - Not built
sdl2_ttf - Not built
werkzeug - Not built
zbarlight - Not built
Removing the build directory and recreating the virtual environment before building the recipes again (starting with pillow by itself) worked! In fact I was able to build more packages this time!
I believe the issue was both something to do with the venv I had before recreating it, and the fact that I included the sudo command in my toolchain command, e.g. sudo toolchain build pillow - removing sudo seems to have worked wonders, just like the tip for recreating the venv and build project.
Thanks guys! I really appreciate the help
No Problem, Happy to help!
Versions
Describe the bug I have successfully built Kivy and many other recipes, to the point of successfully creating an Xcode project. The issue, however, is that Pillow can't seem to build properly, which both kivy-ios requires (according to pip) and so does a few other libraries and an AI of my creation.
The main error, from what I've interpreted, is
fatal error: 'Python.h' file not found
. This error occurs with a few other recipes that refuse to build. Here's mytoolchain status
output. Note: each recipe that is built is one that can be built, and the one's that aren't refuse to do so:To Reproduce
3.12
Pillow version: 10.0.0
(I also tried the latest version)sudo toolchain build pillow
Expected behavior I'm aiming to have the
Pillow
recipe built through the toolchain, so I may update my Xcode project and move on with my App Development asap.Logs This was in the middle of a big stretch of plain logs, but I put it here just in case it's worth noting
Here are the logs where it starts to show errors and eventually, trip up
Additional context
Any help would be greatly appreciated - thanks!