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的更多相关文章

  1. 【Python】pyinstaller打包运行报错failed to execute script main

    前言 最近用pyinstaller打包的时候一直报"failed to execute script main". 最终使用"pyinstaller --hidden-i ...

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

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

  3. 启动 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 ...

  4. 【解决】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 ...

  5. 启动Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误

    启动Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误,如下 原因:eclipse的版本与jre或者jdk版本不 ...

  6. 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 ...

  7. 启动 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 ...

  8. eclipse启动时弹出Failed to create the Java Virtual Machine

    eclipse启动时弹出Failed to create the Java Virtual Machine 一.现象 今天装eclipse的时候出现Failed to create the Java ...

  9. python3.6.2利用pyinstaller发布EXE

    我的环境是Ubuntu 16.04,系统自带Python2和Python3 安装 pip3 install pyinstaller 发布exe pyinstaller -F helloworld.py ...

随机推荐

  1. Linux的基础使用命令

    ifconfig  #查看ip地址     或者使用  ip  a pwd  #查看当前工作路径 man  pwd   #查看命令的详细信息   按q退出 mkdir  /data  创建data目录 ...

  2. 按照教程自动安装RFNoC时.在使用pip安装pybombs时出现报错,解决办法

    $ sudo apt-get install git $ sudo apt-get install python-setuptools python-dev python-pip build-esse ...

  3. ABP 集成 nswag 到 VUE 项目, 自动生成操作类代码

    记录日期: 2019-9-22 23:12:39 原文链接:https://www.cnblogs.com/Qbit/p/11569906.html 集成记录: npm install nswag - ...

  4. TypeHandler简介及配置(mybatis源码篇)

    作者:南柯梦 Mybatis中的TypeHandler是什么? 无论是 MyBatis 在预处理语句(PreparedStatement)中设置一个参数时,还是从结果集中取出一个值时,都会用类型处理器 ...

  5. mysqldump表损坏问题

    遇到的问题:mysqldump: Error 1194: Table 'user' is marked as crashed and should be repaired when dumping t ...

  6. .net 密码明文传输 加密传递方法

    未加密传递是这样的 html标签加密使用的是jquery.md5.js  自行官网下载 html代码 <head runat="server"> <meta ht ...

  7. <<代码大全>>阅读笔记之二 变量名的力量

    1.变量命名的注意事项 1)可理解性 变量要望文知义,看到这个变量不用看其他的代码就知道这个变量表示什么意思 好的变量命:currentDate, heartRate 糟糕的变量名:newButton ...

  8. BZOJ 3932: [CQOI2015]任务查询系统 (主席树板题)

    就是裸的主席树,差分之后排序插入主席树就行了. 注意主席树查询的时候叶子节点要特判,因为本身是有size的 还有要开longlong CODE #include <cctype> #inc ...

  9. 【SQL-历史执行语句查询】 查询对数据库执行了哪些SQL

    Sql语句 QS.creation_time as '创建时间', ), (( THEN DATALENGTH(st.text) ) ) AS '查询语句' , ST.text as '执行文本', ...

  10. laravel事件监听器

    在EventServiceProvide文件里注册事件和监听 protected $listen = [ 'App\Events\SendPhoneCodeEvent' => [ 'App\Li ...