在使用PyInstaller打包python程序,打包命令为:

pyinstaller -F -w -i manage.ico yourpyfile.py

顺便说一下几个参数的作用

-F:是直接生成单独的exe文件,不附带各种依赖文件的。

-c:生成的exe文件打开方式为控制台打开。

-w:这个和上面的-c对应,如果你的程序是有ui的,那就用这个-w。这样不会出现控制台,直接是你的ui。

-I:给你的exe文件添加一个图标,后面要紧接着你想要的ico文件。

-p:后面紧跟着你要指定的模块搜索路径,如果你的模块安装的路径没有被PyInstaller自动检索到的话,就需要自己指定了。

出现“failed to excute script xxx”

这个原因实在是太多了,他就是告诉你程序不能运行。如果你是用-w方式打包的,我们这样不能看出来问题的根源是什么。所以我们还是以-c方式打包exe看一下控制台输出的error内容是什么。

给我报的错误是:no modle named "tensorflow.contrib"

其实tensorflow这个包我已经导入了,而且可以被PyInstaller搜索到。只是它提示我的tensorflow.contirb这个搜索不到,

我猜是版本问题?因为我的tensorflow更新过,最新版的去掉了好多东西,也有一些模块改了实现方式和名称。‘

真正的原因我还没找,但是就先这样吧,因为我想赶紧把问题解决了。

那就:

pyinstaller -F -I manage.ico yourpyfile.py --hidden-import tensorflow.contrib

这样打包,直接把它想要import的这个子包屏蔽掉了,反正也没用到。

python打包成exe fail to ex_“failed to excute script xxx” PyInstaller 打包python程序为exe文件过程错误...相关推荐

  1. python fail to execute,pyinstaller 打包出现“Failed to execute script XXX“问题

    pyinstaller 打包PyQt5的 *.exe 程序出现"Failed to execute script XXX"问题 由于本人刚接触python,偶然看到用PyQt5做窗 ...

  2. Pyinstaller 打包exe 报错 failed to execute script XXX的一种解决方案

    最近用PyQt5写了一个界面小程序,需要打包成exe给到其他windows上使用,一开始使用python 3.7 64位,用pyinstaller打包exe,在64位机上运行正常. 但是目标电脑是32 ...

  3. Pyinstaller 打包exe 报错 “failed to execute script XXX“的一种解决方案

    Pyinstaller 打包exe 报错 "failed to execute script XXX"的一种解决方案 参考文章: (1)Pyinstaller 打包exe 报错 & ...

  4. pyinstaller 打包 python3项目,遇到failed to execute script XXX 错误的解决方法

    近日修改了之前一个使用pyinstaller可以成功打包的python3项目,在IDE中运行正常,但是打包以后运行exe却出现failed to execute script XXX 弹窗提示,无法正 ...

  5. pyinstaller打包报错 Failed to execute script ‘xxx‘ due to unhandled exception:input():lost sys.stdin

    pyinstaller打包报错 Failed to execute script 'xxx' due to unhandled exception:input():lost sys.stdin pyi ...

  6. pyinstaller failed to execute script XXX

    系统环境:Win10+Python3.6.5+pyinstaller4.2 两种原因会导致出现pyinstaller failed to execute script XXX问题. 文章目录 原因一: ...

  7. python打包成exe fail to ex_寻求帮助:pyinstaller打包.exe

    @[寻求帮助!] 使用pyinstaller打包出现以下错误内容 62 INFO: PyInstaller: 3.5 62 INFO: Python: 3.8.0a3 62 INFO: Platfor ...

  8. Python打包exe后报错:Failed to execute script xxxx问题的解决办法

    本篇文章主要讲解,python 通过 pyinstaller 打包python脚本后输出exe,执行时报错 Failed to execute script[脚本无法执行的错误]解决办法 日期:202 ...

  9. 【转载】pyinstaller打包python文件后,运行出现Failed to execute script xxx.exe错误的解决方式(No module named 'xxx')

    版权说明:https://blog.csdn.net/qq_42063091/article/details/82423221 一.问题定位: windows+r进入cmd命令行窗口 cd exe文件 ...

最新文章

  1. 【JOURNAL】恭喜发财
  2. cytoscape绘图互作网络图(二)
  3. FromBottomToTop团队项目总结
  4. java synchronized 使用_Java中synchronized的使用实例
  5. python 高维数据_用Sci-kit learn和XGBoost进行多类分类:Brainwave数据案例研究
  6. 2_C语言中的数据类型 (四)整数与无符号数
  7. Linux防火墙屏蔽ip6,观点|Linux 发行版们应该禁用 IPv4 映射的 IPv6 地址吗?
  8. asp.net 中RadioButtonList的选项改变事件处理(采用jquery操作)
  9. Bootstrap3 带表格的面板
  10. SAP License:SAP S/4 HANA模块功能介绍
  11. Android APK包文件解析
  12. java hashmap 去重_java数组去重的两种方法
  13. windows下把文件压缩成tar.gz格式
  14. 抽奖系统概率设计_《微博抽奖玄学理论·养号攻略XI》
  15. RGB格式学习:RGBx、xRGB、RGBA、ARGB等格式转换成RGB
  16. 鸿蒙系统安全模式,菜鸟必看 如何在安全模式下使用光驱
  17. video 配置详细参数
  18. # Codeforces Round #548 (Div. 2)C Edgy Trees
  19. 三维重建(一)外极几何,基础矩阵及求解
  20. php pdo 支持mysql表类型_全新的PDO数据库操作类php版(仅适用Mysql)

热门文章

  1. 写字板可以保存html,下列不是写字板可以保存的格式是()
  2. django连接mariadb
  3. 三星手机打不开php文件,三星手机将支持完整版Linux
  4. (附源码)springboot车辆管理系统 毕业设计031034
  5. 深度学习案例2:AlexNet网络识别14种鲜花
  6. ios共享账号公众号_家人公众号和共享相册
  7. Java基础二维数组
  8. 摸爬滚打DirectX11_day08——纹理映射
  9. Linux雷鸟邮件,thunderbird雷鸟mail
  10. hdmi接口线_网友很困惑:连接显示器,DP光纤线和HDMI光纤线,究竟哪个更好?...