我正在尝试使用 esky 创建自动更新 zip,我能够创建 msi,但是当我尝试创建自动更新 zip 时,我收到一个错误,指出“Freezer”对象没有属性“createLibraryZip”
我正在使用来自 git bash 的 python 3.5 在 Windows 10 机器上开发它。
我根据本教程创建了我的设置脚本 https://fernandofreitasalves.com/how-to-create-an-application-with-auto-update-using-python-and-esky/
python setup.py bdist_esky
...
copying C:\c\Users\Ezequiel\.virtualenvs\appcon\lib\site-packages\win32\win32wnet.pyd -> dist\appcon-1.1.0.win32\appcon-1.1.0.win32\lib\win32wnet.pyd
copying logging.ini -> dist\appcon-1.1.0.win32\appcon-1.1.0.win32
copying config.ini -> dist\appcon-1.1.0.win32\appcon-1.1.0.win32
copying icon.png -> dist\appcon-1.1.0.win32\appcon-1.1.0.win32
Traceback (most recent call last):
File "setup.py", line 40, in <module>
base=base,
File "C:\c\Users\Ezequiel\.virtualenvs\appcon\lib\site-packages\cx_Freeze\dist.py", line 349, in setup
distutils.core.setup(**attrs)
File "c:\users\ezequiel\appdata\local\programs\python\python35-32\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\ezequiel\appdata\local\programs\python\python35-32\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\ezequiel\appdata\local\programs\python\python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\c\Users\Ezequiel\.virtualenvs\appcon\lib\site-packages\esky\bdist_esky\__init__.py", line 312, in run
self._run()
File "C:\c\Users\Ezequiel\.virtualenvs\appcon\lib\site-packages\esky\bdist_esky\__init__.py", line 320, in _run
self._run_freeze_scripts()
File "C:\c\Users\Ezequiel\.virtualenvs\appcon\lib\site-packages\esky\bdist_esky\__init__.py", line 345, in _run_freeze_scripts
self.freezer_module.freeze(self)
File "C:\c\Users\Ezequiel\.virtualenvs\appcon\lib\site-packages\esky\bdist_esky\f_cxfreeze.py", line 81, in freeze
if f.createLibraryZip:
AttributeError: 'Freezer' object has no attribute 'createLibraryZip'
这是我的 setup.py 脚本
#setup.py
import sys, os
import esky.bdist_esky
from esky.bdist_esky import Executable as Executable_Esky
from cx_Freeze import setup, Executable
os.environ['TCL_LIBRARY'] = r'C:\Users\Ezequiel\.virtualenvs\appdesktop\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Users\Ezequiel\.virtualenvs\appdesktop\tcl\tk8.6'
__version__ = "1.1.0"
include_files = ['logging.ini', 'config.ini', 'icon.png']
if sys.platform == 'win32':
base = 'Win32GUI'
setup(
name = "appcon",
description='Colaboration App',
version = __version__,
options = {
'build_exe': {
'packages': ["os", "idna", "appactions", "customfilehandler", "errno", "ui", "wx","threading","time","logging","configparser","requests","json","base64","pyodbc"],
'excludes': ["tkinter"],
'include_files': include_files,
'include_msvcr': True,
},
'bdist_esky': {
'freezer_module': 'cx_freeze',
}
},
data_files = include_files,
scripts = [
Executable_Esky(
'main.py',
gui_only = True,
# icon = "icon.png"
),
],
executables = [Executable('main.py',
base=base,
# shortcutName="App Connector",
# shortcutDir="DesktopFolder",
)]
)
我意识到错误总是指向最后一个参数上的“可执行文件”,如果我取消注释该行上标记的“shortcutName”错误。
我在谷歌上搜索错误,没有结果,我不知道还有什么我必须安装的...