pyinstaller发布exe,弹出Failed to execute script main
1.在PyCharm中按Alt+F12打开Terminal对话框
1.1我的项目文件放在wxpython目录下,D:\learn\Weather index insurance\wxpython>pyinstaller -F -w teaindex_main.py
1.2运行结束后在D:\learn\Weather index insurance\wxpython目录下生成dist文件夹和build文件夹,我的exe程序在dist文件夹下,双击exe弹出:

1.3重新在Terminal对话框中,运行D:\learn\Weather index insurance\wxpython>pyinstaller -F teaindex_main.py ,运行exe,可以看到问题所在,缺少module typedefs

1.4查阅网上的解决方法
将打包代码改成:
D:\learn\Weather index insurance\wxpython>pyinstaller -F -w teaindex_main.py --hidden-import sklearn
.neighbors.typedefs
问题解决了!成功生成可以运行的exe文件
1.5生成带图标的程序D:\learn\Weather index insurance\wxpython>pyinstaller -F -w -i sunny.ico teaindex_main.py --hidden-import sklearn.neighbors.typedefs
pyinstaller发布exe,弹出Failed to execute script main的更多相关文章
- 【Python】pyinstaller打包运行报错failed to execute script main
前言 最近用pyinstaller打包的时候一直报"failed to execute script main". 最终使用"pyinstaller --hidden-i ...
- Pyinstaller 打包exe 报错 "failed to execute script XXX"的一种解决方案
最近用PyQt5写了一个界面小程序,需要打包成exe给到其他windows上使用,一开始使用python 3.7 64位,用pyinstaller打包exe,在64位机上运行正常. 但是目标电脑是32 ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动
参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...
- 【解决】MacOS下 Python3.7 使用 pyinstaller 打包后执行报错 Failed to execute script pyi_rth__tkinter
Fix tcl/tk libs inclusion in tkinter with Python3.7 under MacOS 使用 Pyinstaller 打包时候报错 3027 ERROR: Tc ...
- 启动Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误
启动Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误,如下 原因:eclipse的版本与jre或者jdk版本不 ...
- 64位操作系统弹出"Failed to load the JNI shared library “E:/2000/Java/JDK6/bin/..jre/bin/client/jvm.dll”
64位操作系统弹出"Failed to load the JNI shared library /..jre/bin/client/jvm.dll”,最大的可能就是jdk的版本问题.去你的C ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!
启动 Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误的解决方法 http://blog.csdn.net/z ...
- eclipse启动时弹出Failed to create the Java Virtual Machine
eclipse启动时弹出Failed to create the Java Virtual Machine 一.现象 今天装eclipse的时候出现Failed to create the Java ...
- python3.6.2利用pyinstaller发布EXE
我的环境是Ubuntu 16.04,系统自带Python2和Python3 安装 pip3 install pyinstaller 发布exe pyinstaller -F helloworld.py ...
随机推荐
- okhttp异步请求流程和源码分析
在上一次[http://www.cnblogs.com/webor2006/p/8023967.html]中对同步请求进行了详细分析,这次来分析一下异步请求,而关于异步请求和同步请求其使用方式基本上差 ...
- Springboot静态资源映射 “/” 引发的血案
因为少写一个 / 浪费已个下午的时间,
- HAL库 TIM计数器及中断开启过程
1.初始化TIM基本计数器参数 void MX_TIM2_Init(void) { TIM_ClockConfigTypeDef sClockSourceConfig = {}; TIM_Master ...
- connect: network is unreachable
解决方法: 在确保完善网卡驱动,以及确保将网卡驱动编译进内核后,检查 ls /etc/sysconfig/network-script/ifcfg-eth0 一.看是否在上述目录下存在ifcfg-et ...
- C#中使用ListView动态添加数据不闪烁(网上方法会出问题)
最近需要使用做一个动态行显示,所以就用到了ListView控件,在网上也查到了关于动态添加不闪烁的方式都是如下: 首先,自定义一个类ListViewNF,继承自 System.Windows.Form ...
- 01_初识redis
1.redis和mysql mysql是一个软件,帮助开发者对一台机器的硬盘进行操作. redis是一个软件,帮助开发者对一台机器的内存进行操作 汽车之家,如果硬盘挂掉了,页面还能访问1个月 关键字: ...
- 清除文本中Html的标签
/// <summary> /// 清除文本中Html的标签 /// </summary> /// <param name="Content"> ...
- Java项目出现的问题--学习--SSM
01 反向工程正常运行但是没有出现应该有的包 进行反向工程时记得要刷新一下才能看到的 03 复制包只有当前目录的包,目录下的文件不包含 当sec下的包以hierarcical形式排布时复制只能复制当前 ...
- scrollTop([val])
scrollTop([val]) 概述 获取匹配元素相对滚动条顶部的偏移.广州大理石机械构件 此方法对可见和隐藏元素均有效. 参数 valString, NumberV1.2.6 设定垂直滚动条值 示 ...
- .Net利用cwbx.dll call AS400 program得到数据
calling as400 programs from c# http://forums.asp.net/t/1817332.aspx?calling+as400+programs+from+c+ H ...