我正在尝试使用esky创建自动更新zip,我能够创建msi但是当我尝试制作自动更新zip时,我得到一个错误,指的是'Freezer'对象没有属性'createLibraryZip'< / p>
我正在使用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”错误标记在该行上。
我谷歌搜索错误没有结果,我不知道还有别的东西我必须安装......
答案 0 :(得分:1)
如果您已升级到cx_Freeze 5或更高版本,则createLibraryZip将一直消失。这是早期版本的cx_Freeze中的一个选项。
答案 1 :(得分:0)
支持esky的cx_freeze最新版本是4.3.4,不幸的是esky已停止升级了几年...