Closed miklesz closed 1 year ago
Can confirm that this also fails on Linux. It looks like there were some changes to the frozen module import mechanism in Python 3.11, such as python/cpython#28778 - it looks like a change that is actually very useful for us but I have to review the implications.
Actually, it's due to two changes made to the _frozen
struct in Python 3.11, one of which undocumented.
For now I'm going to fix this by modifying deploy-stub to copy and transform it to a new structure, so that I can hot-fix this by uploading new wheels so that nobody has to update their version of Panda.
Making use of the other changes to the frozen import mechanism sounds like a good idea for a future version of Panda.
I think this is fixed, I uploaded updated wheels, can you delete your build directory and try again? You don't need to update your version of Panda3D on the host. Please verify that see something like "1.10.13+post1" in the message about which .whl gets downloaded by the build_apps
command.
I hereby confirm that the fix works. After deleting the previous wheels, the new ones (with 1.10.13+post1
in the name) were downloaded and the Python 3.11 build works without problems (on macOS). Thank you for your support!
Description
I'm having issues with my app builds when I want to use Python 3.11 (which, according to release notes, has been supported since Panda3D version 1.10.12: https://github.com/panda3d/panda3d/releases). At least under macOS.
To isolate the error, I created 2 (almost) identical, simple PyCharm projects, differing only in Python versions: 3.10 (more precisely: 3.10.9) and 3.11 (more precisely: 3.11.1).
Steps to Reproduce and Environment
Here's the code for the main (and only) script,
main.py
, which, as you can see, creates an object of theShowBase()
class, prints some basic information about the existing environment to the console, and opens a basic window:Here is my
requirements.txt
(as you can see, it only requires Panda3D):Here is my
setup.py
(as you can see, it builds the GUI app, sets up file logging, and includes basic plugins):(version for 3.11 differs only in that it uses the string:
Panda3D_Python3.11
)And this is how I call building the application (as you can see, completely standard):
And now this: under PyCharm (that is, actually launched from the console, as an argument of the Python interpreter) everything works fine, both under 3.10 and under 3.11 (the only obvious difference is in the version number that is printed). The following appears on the console:
3.10:
3.11:
I am able to build an app for both 3.10 and 3.11. The logs from the application build are as follows (yes, I see some disturbing things there, although I don't know what to do with them):
3.10:
3.11:
The problems start when I try to run the built app.
For 3.10, everything works fine, and the output.log looks like this (it's a bit different than in PyCharm, in the context of configuration files, but it's probably understandable):
For 3.11, the application crashes immediately, and the output.log is empty (I attach the log from the Problem Report):
Any help in solving the above problem will be appreciated. Thanks in advance.