【发布时间】:2016-04-26 23:37:44
【问题描述】:
大家好,感谢您抽出宝贵时间帮助我。
我目前正在尝试使用 PyInstaller (3.1) 为我的 Kivy (1.9.1) 应用程序创建一个 Windows 包。我按照文档中的说明进行操作,但无法正常工作。因此,我尝试使用作为示例给出的演示应用程序“touchtracer”,结果相同。我收到以下错误:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "f:\temp\pip-build-1elcla\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 48, in <module>
from pkg_resources.extern import six
File "C:\Python27\lib\site-packages\pkg_resources\extern\__init__.py", line 60, in load_module
"distribution.".format(**locals())
ImportError: The 'six' package is required; normally this is bundled
with this package so if you get this warning, consult the packager of
your distribution.
pyi_rth_pkgres returned -1
这是我的 .spec 文件:
# -*- mode: python -*-
from kivy.deps import sdl2, glew
block_cipher = None
a = Analysis(['C:\\Python27\\share\\kivy-examples\\demo\\touchtracer\\main.py'],
pathex=['C:\\Users\\PC\\Documents\\Njord\\njord\\Nouveau dossier'],
binaries=None,
datas=None,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='touchtracer',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe, Tree('C:\\Python27\\share\\kivy-examples\\demo\\touchtracer\\'),
a.binaries,
a.zipfiles,
a.datas,
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
strip=False,
upx=True,
name='touchtracer')
我尝试使用从 pip 安装的 Kivy 软件包和使用轮子的方法,但没有成功。有人解释一下吗?
再次感谢。
【问题讨论】:
标签: python windows package kivy pyinstaller