python打包生成exe报错

     

  • 如图所示    如果出现的是这个问题可以可以考虑以下方法

  首先卸载原先下载的 Pyinstaller

  pip uninstall pyinstaller

  再执行以下代码,去github上下载

  pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

  注释:再次打包,请将之前生成的文件删除

     如:,build/,dist/,及main.spec 等

  参考:

  1. https://blog.csdn.net/weixin_41879093/article/details/104216881
  2. https://www.lizenghai.com/archives/105701.html
  3. http://www.mustenaka.cn/index.php/2020/04/01/failed-to-execute-script-pyi_rth_pkgres/

(起飞)

如果确实下载很慢:

  链接: https://pan.baidu.com/s/1HKYHMk7BMpWViKLGiyiIhA 提取码: xrt4

  去 pycharm 看解释器位置

  放到 script下  直接在目录启动cmd

  pip install pyinstaller-develop.zip (应该是这样   不行  自己   加加油   要不还是用那个链接吧)

原文地址:https://www.cnblogs.com/jiangxunqi/p/13323117.html