gpt4 book ai didi

python - Pyinstaller 缺少 SqlAlchemy dll

转载 作者:太空宇宙 更新时间:2023-11-03 14:56:33 26 4
gpt4 key购买 nike

我正在使用 Pyinstaller 将 Python 编译成独立的可执行文件。源代码包括模块 PySide 和 SqlAlchemy。 PyInstaller 创建的 dist .exe 运行正常,但是当我运行访问数据库的命令时,我在命令提示符中收到此错误代码:

Traceback (most recent call last):
File "clipper_tree.py", line 1907, in add_tree
File "build\bdist.win-amd64\egg\sqlalchemy\sql\operators.py", line 304, in __eq__
File "build\bdist.win-amd64\egg\sqlalchemy\orm\attributes.py", line 175, in operate
File "build\bdist.win-amd64\egg\sqlalchemy\sql\operators.py", line 304, in __eq__
File "build\bdist.win-amd64\egg\sqlalchemy\orm\properties.py", line 270, in operate
File "build\bdist.win-amd64\egg\sqlalchemy\sql\annotation.py", line 95, in __eq__
File "build\bdist.win-amd64\egg\sqlalchemy\sql\operators.py", line 304, in __eq__
File "build\bdist.win-amd64\egg\sqlalchemy\sql\elements.py", line 686, in operate
File "build\bdist.win-amd64\egg\sqlalchemy\sql\operators.py", line 304, in __eq__
File "<string>", line 1, in <lambda>
File "build\bdist.win-amd64\egg\sqlalchemy\sql\type_api.py", line 62, in operate
File "build\bdist.win-amd64\egg\sqlalchemy\util\langhelpers.py", line 964, in __getattr__
File "build\bdist.win-amd64\egg\sqlalchemy\util\langhelpers.py", line 962, in __getattr__
ImportError: Could not resolve module sqlalchemy.sql.default_comparator

编译时,命令提示符输出一些警告,提示无法找到与 sql alchemy 相关的“隐藏 DLL”。它说它正在删除 sqlalchemy/test 文件作为回应。在这里的任何帮助将不胜感激。

最佳答案

我之前遇到过同样的问题。通过在我的主程序中导入 sqlalchemy.sql.default_comparator 解决了这个问题。

关于python - Pyinstaller 缺少 SqlAlchemy dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41960433/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com