Closed CarlosNano closed 2 years ago
It's difficult to come to any conclusions based on the detail you've provided; I'm guessing the issue is with the project configuration, and what has actually been included in your app bundle. The bootstrap script looks reasonable - but you also need to ensure that all the Python stdlib resources are included - and if you've built a project from scratch, they won't be.
At this time, the only usage of this package that is officially supported is usage from within Briefcase. If you're able to reproduce this error from the Briefcase bootstrap, then I'd consider that a bug; any usage outside that falls into the "do what Briefcase does, and it will work" category.
Oh so I guess I could follow this tutorial: https://docs.beeware.org/en/latest/tutorial/tutorial-5/iOS.html to create an app with Briefcase.
Thanks for the response.
Describe the bug When I run
Py_Initialize();
the app crashes and I get:I've found this other ticket: https://github.com/beeware/Python-Apple-support/issues/21 which advised how to set up python.
My code is a copy of the main file:
I've replaced the execution of the python code with
PyRun_SimpleString
, but the problem is happening inPy_Initialize
Any advise how to find where the problem is? For what I could find in searching it could be to do with the
PYTHONHOME
orPYTHONPATH
Thanks
Expected behavior No crash neither errors in the console
Environment:
Operating System: 12.2.1 Python version: 3.10