微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Pyinstaller 无法导入模块 __PyInstaller_hooks_0_pydoc

如何解决Pyinstaller 无法导入模块 __PyInstaller_hooks_0_pydoc

我尝试在 python3.6.9 中构建屏幕阅读器作为大学作业。python 脚本工作正常,但是当我尝试使用 PyInstaller 4.3 创建应用程序时,它显示错误消息: PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyInstaller_hooks_0_pydoc required by hook for module /home/charles/.local/lib/python3.6/site-packages/PyInstaller/hooks/hook-pydoc.py. Please check whether module __PyInstaller_hooks_0_pydoc actually exists and whether the hook is compatible with your version of /home/charles/.local/lib/python3.6/site-packages/PyInstaller/hooks/hook-pydoc.py:

它还在构建可执行文件显示许多警告。

请告诉我如何解决这个问题。

解决方法

作为解决方法,您可以尝试:

pyinstaller your_file.py --exclude-module pydoc

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。