pyinstaller 打包运行出错,求助

雷中听风 2018-06-10 10:31:29
OS version: Windows-10-10.0.17134-SP0
Python version: 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]
wxPython version: 4.0.1 (wxWidgets 3.0.4)
SQLAlchemy version: 1.2.8
Logbook version: 1.4.0
Requests version: 2.18.4
Dateutil version: 2.7.3

####################

Traceback (most recent call last):
File "pyfa.py", line 128, in <module>
File "c:\program files (x86)\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "gui\mainFrame.py", line 45, in <module>
File "c:\program files (x86)\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "gui\additionsPane.py", line 24, in <module>
File "c:\program files (x86)\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "gui\builtinAdditionPanes\boosterView.py", line 26, in <module>
File "c:\program files (x86)\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "gui\contextMenu.py", line 182, in <module>
File "c:\program files (x86)\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "gui\builtinContextMenus\commandFits.py", line 12, in <module>
File "gui\builtinContextMenus\commandFits.py", line 16, in CommandFits
File "site-packages\sqlalchemy\orm\attributes.py", line 242, in __get__
File "site-packages\sqlalchemy\orm\attributes.py", line 599, in get
File "site-packages\sqlalchemy\orm\strategies.py", line 630, in _load_for_state
File "<string>", line 1, in <lambda>
File "site-packages\sqlalchemy\orm\strategies.py", line 683, in _emit_lazyload
File "site-packages\sqlalchemy\util\langhelpers.py", line 837, in __getattr__
File "<string>", line 1, in <lambda>
File "site-packages\sqlalchemy\orm\strategies.py", line 653, in _memoized_attr__bakery
File "site-packages\sqlalchemy\util\langhelpers.py", line 977, in __getattr__
File "site-packages\sqlalchemy\util\langhelpers.py", line 975, in __getattr__
ImportError: Could not resolve module sqlalchemy.ext.baked

怎么破啊,查看langhelper.py,提示:
        def __getattr__(self, key):
if key == 'module':
raise ImportError("Could not resolve module %s"
% self._full_path)
try:
attr = getattr(self.module, key)
except AttributeError:
raise AttributeError(
"Module %s has no attribute '%s'" %
(self._full_path, key)
)
self.__dict__[key] = attr
return attr

可是在python下运行正常,没有头绪。求助。
...全文
731 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
雷中听风 2018-06-10
  • 打赏
  • 举报
回复
sqlalchemy肯定装了吗,因为在python中可以运行。不过原因找到了,和你说的差不多。 需要显式的import sqlalchemy.ext.baked。 问题解决。
tianfang 2018-06-10
  • 打赏
  • 举报
回复
非显示依赖 sqlalchemy, 安装sqlalchemy

37,743

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧