You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of my projects depends on fastapi framework, when I use the standard library zipapp to compress the project and run it independently it will report an error: ModuleNotFoundError: No module named 'pydantic_core._pydantic_core', it seems that the fastapi framework in the pydanctic_core will depend on the c extension, but after zipping and packaging it will have ModuleNotFoundError, can the official solve this problem with the standard library zipapp. There are many scenarios where being able to call a pyz file using python still smells good.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered:
zipapp doesn’t support applications with C extension modules. From the Caveats section of the zipapp docs:
If your application depends on a package that includes a C extension, that package cannot be run from a zip file (this is an OS limitation, as executable code must be present in the filesystem for the OS loader to load it). In this case, you can exclude that dependency from the zipfile, and either require your users to have it installed, or ship it alongside your zipfile and add code to your __main__.py to include the directory containing the unzipped module in sys.path.
Bug report
Bug description:
One of my projects depends on fastapi framework, when I use the standard library zipapp to compress the project and run it independently it will report an error: ModuleNotFoundError: No module named 'pydantic_core._pydantic_core', it seems that the fastapi framework in the pydanctic_core will depend on the c extension, but after zipping and packaging it will have ModuleNotFoundError, can the official solve this problem with the standard library zipapp. There are many scenarios where being able to call a pyz file using python still smells good.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: