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 ...
随机推荐
- bat %n 判断传入的参数值和使用注意
bat %n 判断传入的参数值和使用注意 if "%1" == "" echo empty 1 if exist "%1" echo 1pa ...
- Android之Json
Servlet部分 public class JasonAction extends HttpServlet { private JsonService service; public void do ...
- freertos,串口接收数据后如何发送给任务
http://www.stmcu.org.cn/module/forum/thread-610230-1-1.html http://www.stmcu.org.cn/module/forum/thr ...
- hdu 6074 Phone Call
题 O∧O http://acm.hdu.edu.cn/showproblem.php?pid=6074 2017 Multi-University Training Contest - Team 4 ...
- 使用Future、asyncio处理并发
并发的意义 为了高效处理网络I/O,需要使用并发,因为网络有很高的延迟,所以为了不浪费CPU周期去等待,最好在收到网络响应之前做些其他的事. 在I/O密集型应用中,如果代码写得正确,那么不管是用哪种并 ...
- Java开发中使用事务
一. XML,使用tx标签配置拦截器实现事务 二. Annotation方式 一.XML,使用tx标签配置拦截器实现事务 中主要配置中是tx:advice和aop:config两个 ...
- Python基础之enumerate枚举
枚举,对于一个可迭代的(iterable)/可遍历的对象(如列表,字符串),enumerate将其组成一个索引序列,利用它可以同时获得索引和值. 1. 第一种类型 lst = ["a&quo ...
- td中文字居中
<style> .table_style{width: 100%;height: auto;} .table_style tr td{text-align: center;vertical ...
- pydub音频处理库的使用
pydub音频处理库的使用 在使用pydub这个模块之前应确保你的libav或者FFmpeg Mac上安装libav或FFmpeg brew install libav --with-libvorbi ...
- airflow自动生成dag
def auto_create_dag(): dag_list=[] dag = DAG() dag_list.append(dag) return dag_list dags = auto_crea ...