将 kinterbasdb 与 py2exe 一起使用

发布于 2024-12-16 02:24:53 字数 704 浏览 7 评论 0原文

我正在尝试使用 py2exe 创建可执行程序。导入 kinterbasdb 时,我收到以下错误消息:

Traceback (most recent call last):
  File "AlarmReporter.py", line 13, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "kinterbasdb\__init__.pyo", line 119, in <module>
  File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading kinterbasdb\_kinterbasdb.pyd

这是我的 py2exe 的非常基本的 setup.py:

from distutils.core import setup
import py2exe
import sys


setup(
        options={'py2exe': dict(bundle_files=1, optimize=2)},
        console=['AlarmReporter.py'],
        zipfile=None,
)

我在理解错误消息时遇到问题,并且不知道如何修复它。

I'm trying to create executable program with py2exe. I get the following error message when kinterbasdb is imported:

Traceback (most recent call last):
  File "AlarmReporter.py", line 13, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "kinterbasdb\__init__.pyo", line 119, in <module>
  File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading kinterbasdb\_kinterbasdb.pyd

Here's my very basic setup.py for py2exe:

from distutils.core import setup
import py2exe
import sys


setup(
        options={'py2exe': dict(bundle_files=1, optimize=2)},
        console=['AlarmReporter.py'],
        zipfile=None,
)

I'm having problem understanding the error message and have no idea how to fix it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哎呦我呸! 2024-12-23 02:24:53

尝试排除 libfbclient dll

将 .py 转换为 .exe 时出错

如果没有不行,尝试使用新的 fdb 驱动程序(未来 kinterbasdb 的替代品)
http://permalink.gmane.org/gmane.comp.db。 firebird.python/104
(它不需要只编译 libfbclient.dll)

另一种选择是使用不需要 dll 和 c 生成的二进制文件的纯驱动程序
https://github.com/nakagami/pyfirebirdsql

但您将自行承担使用它的风险;)

Try to exclude libfbclient dll

Error while transforming .py to .exe

If that doesn't work , try to use the new fdb driver (the future replacement of kinterbasdb)
http://permalink.gmane.org/gmane.comp.db.firebird.python/104
(it doesn't need compiling only the libfbclient.dll)

Another option is to use the pure driver that doesn't need no dll and no c generated binary
https://github.com/nakagami/pyfirebirdsql

But you will use it at your own risk ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文