4

I have a zip file with a __main__.py that executes fine: ./myapp

But inside of this zip, there is a C extension library.so file that must be loaded but this library.so file is not being found.

If I execute the directory (without zipping it), it executes correctly. So it appears the C extensions are not supported or is some configuration issue. Any ideas?

http://www.python.org/dev/peps/pep-0441/

4

1 回答 1

4

无法从.zip库中加载 C 扩展。这是 Python 无法控制的限制。

这已经适用于zipimport支持

ZIP 存档中可能存在任何文件,但只有文件 .py 和 .py[co] 可用于导入。不允许 ZIP 导入动态模块(.pyd、.so)。

于 2013-05-01T18:43:36.057 回答