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. scala学习(4)---Array定长数组操作

    ScalaArrayNote: https://www.jianshu.com/p/d906f00c05bf

  2. Python3+Appium学习笔记03-启动app

    这个是appium相关的官方api地址:http://appium.io/docs/en/about-appium/api/ 如同selenium进行自动化测试时,需要先创建一个浏览器实例一样.在使用 ...

  3. go mod 解决 Go 语言的包依赖问题

    转:https://testerhome.com/topics/16980 https://testerhome.com/ -------------------------------------- ...

  4. Raid0、Raid0+1、Raid1、Raid5四者的区别

    RAID,可以把硬盘整合成一个大磁盘,还可以在大磁盘上再分区,放数据还有一个大功能,多块盘放在一起可以有冗余(备份)RAID整合方式有很多,常用的:0 1 5 10 Raid0Raid0是所有raid ...

  5. mysql_config_editor设置

    [root@node01 etc]# mysql_config_editor set -G mysql3307 -S /tmp/mysql3307.sock -uroot -pEnter passwo ...

  6. Qt中PushButton的pressed,released,clicked三种响应的区别

    Qt的PushButton的常用的三种响应有pressed,released和clicked. 优先级:pressed>released>clicked 按下按钮pressed函数的内容, ...

  7. 洛谷-P3808-AC自动机(模板)

    链接: https://www.luogu.org/problem/P3808 题意: 给定n个模式串和1个文本串,求有多少个模式串在文本串里出现过. 思路: 模板, 代码: #include < ...

  8. SuperSocket实例

    下载地址:https://files.cnblogs.com/files/xixixing/ConsoleApp.zip 创建控制台应用程序:ConsoleApp MySession.cs using ...

  9. @EnableScheduling

  10. java实现上传文件夹

    我们平时经常做的是上传文件,上传文件夹与上传文件类似,但也有一些不同之处,这次做了上传文件夹就记录下以备后用. 首先我们需要了解的是上传文件三要素: 1.表单提交方式:post (get方式提交有大小 ...