0

我正在尝试将脚本转换为exe使用 pyinstaller 和 Python3.70(在 Windows 10 上)

当我运行命令时

pyinstaller --onefile myfile.py

libcrypto该程序运行良好,除了一些关于等的警告。

但是当我尝试运行exe在 dist 文件夹中找到的文件时,我收到以下错误消息:

Fatal Python error: initfsencoding: unable to load the file system codec
zipimport.ZipImportError: can't find module 'encodings'

Current thread 0x00002afc (most recent call first):
4

1 回答 1

1

尝试降级到 Python 3.6,Pyinstaller 和 Python 3.7 似乎存在尚未解决的问题。根据 Pyinstaller:

PyInstaller 适用于 Python 2.7 和 3.3—3.6

于 2018-07-23T12:27:54.613 回答