python打包错误求解

尘日天 2019-10-23 01:16:27
venv) C:\Users\Administrator\PycharmProjects\untitled>pyinstaller -F py.py 43 INFO: PyInstaller: 3.5 44 INFO: Python: 3.8.0 44 INFO: Platform: Windows-10-10.0.17134-SP0 44 INFO: wrote C:\Users\Administrator\PycharmProjects\untitled\py.spec 45 INFO: UPX is not available. 46 INFO: Extending PYTHONPATH with paths ['C:\\Users\\Administrator\\PycharmProjects\\untitled', 'C:\\Users\\Administrator\\PycharmProjects\\untitled'] 46 INFO: checking Analysis 103 INFO: checking PYZ 103 INFO: Building PYZ because PYZ-00.toc is non existent 103 INFO: Building PYZ (ZlibArchive) C:\Users\Administrator\PycharmProjects\untitled\build\py\PYZ-00. pyz Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _ru n_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run _code exec(code, run_globals) File "C:\Users\Administrator\PycharmProjects\untitled\venv\Scripts\pyinstaller.exe\__main__.py", li ne 9, in <module> File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\__main__.p y", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\__main__.p y", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\b uild_main.py", line 844, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\b uild_main.py", line 791, in build exec(code, spec_namespace) File "C:\Users\Administrator\PycharmProjects\untitled\py.spec", line 18, in <module> pyz = PYZ(a.pure, a.zipped_data, File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\a pi.py", line 98, in __init__ self.__postinit__() File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\d atastruct.py", line 158, in __postinit__ self.assemble() File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\a pi.py", line 128, in assemble self.code_dict = { File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\a pi.py", line 129, in <dictcomp> key: strip_paths_in_code(code) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\u tils.py", line 652, in strip_paths_in_code consts = tuple( File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\u tils.py", line 653, in <genexpr> strip_paths_in_code(const_co, new_filename) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\u tils.py", line 660, in strip_paths_in_code return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize, TypeError: an integer is required (got type bytes) (venv) C:\Users\Administrator\PycharmProjects\untitled>.co_argcount, co.co_kwonlyargcount, co.co_nloc als, co.co_stacksize, '.co_argcount' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 (venv) C:\Users\Administrator\PycharmProjects\untitled>TypeError: an integer is required (got type by tes) 'TypeError:' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
...全文
287 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
尘日天 2020-10-10
  • 打赏
  • 举报
回复
学到啦,科学上网解决
VRmaxwell 2019-12-26
  • 打赏
  • 举报
回复
哈喽,提供一个可能的解决方案: 解决方法: 命令行中输入 pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz 来重新安装pyinstaller

37,744

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧