我试图转换和打包我的 python 文件,旨在将电子邮件发送到 .exe,以便同事可以在不知道 python 的情况下使用它,但我在尝试直接使用 pyinstaller 时首先收到此错误,后来在发现 auto-py 时收到此错误-to-exe。
错误如下:
ImportError: cannot import name 'can_import_module' from 'PyInstaller.utils.hooks' (c:\users\alex gille\anaconda3\lib\site-packages\PyInstaller\utils\hooks\__init__.py)
我试图在命令提示符下更新并重新安装 pyinstaller,但这并没有解决问题。我也在 Anaconda 中这样做以增加上下文。该脚本基于 tkinter 和 yagmail。如果需要,很高兴提供此尝试转换的脚本的代码。