I want to pack my application using pyoxidizer
. I need to add PySide2
to my package.
policy.resources_location = "in-memory"
policy.resources_location_fallback = "filesystem-relative:relative"
for resource in exe.pip_install(["pyside2"]):
exe.add_python_resource(resource)
If I remove the line policy.resources_location_fallback = "filesystem-relative:relative"
, I get:
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExtensionModule<name=PySide2.Qt3DAnimation>
Caused by:
extension module PySide2.Qt3DAnimation cannot be loaded from memory but memory loading required
--> ./pyoxidizer.bzl:258:9
|
258 | exe.add_python_resource(resource)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ add_python_resource
error: adding PythonExtensionModule<name=PySide2.Qt3DAnimation>
Caused by:
extension module PySide2.Qt3DAnimation cannot be loaded from memory but memory loading required
If the fallback is defined, I get the error:
Caused by:
resource collector does not allow resources in filesystem-relative
--> ./pyoxidizer.bzl:258:9
|
258 | exe.add_python_resource(resource)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ add_python_resource
error: adding PythonExtensionModule<name=PySide2.Qt3DAnimation>
Caused by:
resource collector does not allow resources in filesystem-relative
This also applies for other packages like Pillow
. I have not found anything to solve this issue and I'm not sure what this error message means.
System Information
- Mac OS Big Sur, Ver. 11.5.1
- Python 3.9.7
- PySide2, ver 5.15.2