PyInstaller打包python脚本时出错

wanj2015 2017-03-24 06:31:45
D:\PyInstaller-3.2.1>python pyinstaller.py -F E:\Pywork\myapp\test.py
497 INFO: PyInstaller: 3.2.1
498 INFO: Python: 3.6.0
499 INFO: Platform: Windows-10-10.0.14393-SP0
501 INFO: wrote D:\PyInstaller-3.2.1\test\test.spec
503 INFO: UPX is not available.
506 INFO: Extending PYTHONPATH with paths
['E:\\Pywork\\myapp', 'D:\\PyInstaller-3.2.1\\test']
508 INFO: checking Analysis
509 INFO: Building Analysis because out00-Analysis.toc is non existent
510 INFO: Initializing module dependency graph...
513 INFO: Initializing module graph hooks...
559 INFO: Analyzing base_library.zip ...
Traceback (most recent call last):
File "pyinstaller.py", line 15, in <module>
run()
File "D:\PyInstaller-3.2.1\PyInstaller\__main__.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "D:\PyInstaller-3.2.1\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "D:\PyInstaller-3.2.1\PyInstaller\building\build_main.py", line 788, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "D:\PyInstaller-3.2.1\PyInstaller\building\build_main.py", line 734, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "D:\PyInstaller-3.2.1\PyInstaller\building\build_main.py", line 212, in __init__
self.__postinit__()
File "D:\PyInstaller-3.2.1\PyInstaller\building\datastruct.py", line 161, in __postinit__
self.assemble()
File "D:\PyInstaller-3.2.1\PyInstaller\building\build_main.py", line 317, in assemble
excludes=self.excludes, user_hook_dirs=self.hookspath)
File "D:\PyInstaller-3.2.1\PyInstaller\depend\analysis.py", line 560, in initialize_modgraph
graph.import_hook(m)
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 1509, in import_hook
source_package, target_module_partname, level)
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 1661, in _find_head_package
target_module_headname, target_package_name, source_package)
File "D:\PyInstaller-3.2.1\PyInstaller\depend\analysis.py", line 209, in _safe_import_module
module_basename, module_name, parent_package)
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 2077, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 2167, in _load_module
self._scan_code(m, co, co_ast)
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 2585, in _scan_code
module, module_code_object, is_scanning_imports=False)
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 2831, in _scan_bytecode
global_attr_name = get_operation_arg_name()
File "D:\PyInstaller-3.2.1\PyInstaller\lib\modulegraph\modulegraph.py", line 2731, in get_operation_arg_name
return module_code_object.co_names[co_names_index]
IndexError: tuple index out of range



大神们这种错误该如何解决呀
...全文
438 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
wanj2015 2017-04-11
问题已经解决了 是python版本的问题 Python34 版本就行了。 PyInstaller-3.2.1的版本 如果电脑上安装了多个版本的话,记得 不要冲突就行了
回复
data挖掘机 2017-04-10
请问解决了吗?解决了的话麻烦能告诉我一下,同出现这个问题。谢谢
回复
wanj2015 2017-03-28
没有人吗,自己顶
回复
相关推荐
发帖
脚本语言
创建于2007-08-27

3.7w+

社区成员

JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
申请成为版主
帖子事件
创建了帖子
2017-03-24 06:31
社区公告

CSDN 脚本语言社区接受专栏投稿(专栏会在顶部创建专属你的栏目),投稿需满足以下要求:

  • 脚本语言技术相关;
  • 文章持续更新,保持活跃;
  • 内容清晰明了,干货为主;
  • 文章排版有序,有条有理。

本社区开通招聘专栏,发布招聘信息请联系版主,发布者需要保证招聘信息真实有效,CSDN 平台和版主不对招聘内容负责!

联系方式:私聊版主、发送邮件、QQ联系等均可: