Open Sytse45 opened 5 months ago
I got the same error message and I am using Python version 3.12.2. For me, Pygame can't be compiled because it doesn't find longintrepr.h.
Moved to kivy/python-for-android
as is the right place for this discussion.
@Sytse45 @Blobinius this is not happening on our CI and my side, can you please confirm that python-for-android
dependencies has been installed as per these docs?
Can you please also confirm your Cython version and if you're running buildozer
(or p4a
) from a virtual environment?
I have the same issue with python 3.8, jnius cannot compile. in my spec i have the following requirements: requirements = python3,flask,flask-mobility,werkzeug==2.3.7,Cython==0.29.33,flask-sqlalchemy==2.5.0,sqlalchemy,flask-wtf,wtforms,pytest
Hi, did anyone manage to solve it? because I believe I have the same problem
Found a temporary solution
pip3 install --user --upgrade Cython==0.29.33 virtualenv
And in spec:
requirements = python3==3.10.12,kivy==2.3.0,hostpython3==3.10.12,pyjnius==1.5.0
osx.python_version = 3.10.12
osx.kivy_version = 2.3.0
OR
Install buildozer not with pipy repository but
pip install https://github.com/kivy/buildozer/archive/master.zip
Than it works without any changes in spec file
hello, i think i have the same problem, i tried executing the commands (in google colab) but got no results, has anyone got another solution? thanks
Make sure that you are using latest Buildozer, currently 1.5.0. To check:
buildozer --version
If not please update Buildozer and dependencies:
pip3 install --user --upgrade Cython==0.29.33 virtualenv
pip3 install --user --upgrade buildozer
hello, i found a solution in google colab:
i wasn't doing the export path thing, here's a way without it:
instead of doing "buildozer init" or "buildozer android debug", do:
/root/.local/bin/buildozer init /root/.local/bin/buildozer android debug
i didn't do the export path cause im a bit newbie sorry, that is a solution to not do the export path
I'm having the same issue with the "longintrepr.h", but mine is caused by SDL2.
Found a temporary solution
pip3 install --user --upgrade Cython==0.29.33 virtualenv
And in spec: requirements = python3==3.10.12,kivy==2.3.0,hostpython3==3.10.12,pyjnius==1.5.0 osx.python_version = 3.10.12 osx.kivy_version = 2.3.0OR
Install buildozer not with pipy repository but
pip install https://github.com/kivy/buildozer/archive/master.zip
Than it works without any changes in spec file
I was able to address the "longintrepr.h" issue and build PyGame by changing the requirements to python3==3.10.12,kivy==2.3.0,hostpython3==3.10.12,pyjnius==1.5.0
Thanks!
Software Versions
~/.local/lib/python3.9/site-packages/kivy/__init__.py
Describe the bug After buildozer failed in updating my PyQRS program (in contrast to one month ago), I narrowed the problem down to the following:
buildozer -v android debug
fails to produce an.apk
file from the simple kivy app 'pong' and with the defaultbuildozer.spec
file (from buildozer version 1.5.0).Expected behavior I expect to find an .apk file as a result.
To Reproduce A simple kivy app (Pong, see next section) runs ok when issuing the command
python3 main.py
, but buildozer fails with the fatal error:jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found
.In the
buildozer.spec
file, generated by buildozer 1.5.0, I only changed the first two uncommented lines intotitle = Pong
andpackage.name = pong
.Code and Logs and screenshots The file
main.py
for the kivy app 'Pong' (without apong.kv
file):The last relevant output lines:
Last part of the log file:
Additional context Searching on internet brought me to https://stackoverflow.com/questions/74979674/gensim-install-in-python-3-11-fails-because-of-missing-longintrepr-h-file, where a missing
longintrepr.h
file was attributed to the use of python 3.11.