问题描述
我尝试在 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