我正在尝试复制以下示例:https://github.com/takluyver/pynsist/tree/master/examples/tkinter但它不起作用。我有一个从此处复制粘贴的 python 文件和 .cfg,但是当我py -m nsist installer.cfg
在命令提示符下运行时,出现以下错误:
C:\Users\Mike\Desktop>py -m nsist installer.cfg
Traceback (most recent call last):
File "C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nsist\__main__.py", line 2, in <module>
main()
File "C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nsist\__init__.py", line 527, in main
shortcuts = configreader.read_shortcuts_config(cfg)
File "C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nsist\configreader.py", line 182, in read_shortcuts_config
appcfg = cfg['Application']
File "C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 956, in __getitem__
raise KeyError(key)
KeyError: 'Application'
我在 Windows 10 64 位上从 Python 3.6.0 运行它。