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 ...
随机推荐
- 浅析servlet
目录 Servlet简介 Servlet定义 Servlet的特点 Servlet底层原理 Servlet GenericServlet HttpServlet Servlet的生命周期 Servle ...
- kettle 数据抽取时会出现 无法插入NULL
kettle 数据抽取时会出现 无法插入NULL,其实是空字符串,原因是kettle默认不区分空字符串和NULL. 解决办法: 修改kettle.properties 文件:
- adreno的tbdr
看完apple的(&&powervr) 再来撸高通的.. FlexRender 能自己选三种模式 Direct Binning 这个只是分块 HWVizBinning 这个估计就是tb ...
- frontEnd(前端基础)
第一章:前端概述 第二章:前端三剑客 第三章:第一个页面 第四章:html常用标签 第五章:标签分类 第六章:css三种引入方式 第七章:样式与长度颜色 第八章:常用样式 第九章:CSS选择器 第十章 ...
- learning gcc #pragma once
referenc: https://zh.wikipedia.org/wiki/Pragma_once 在C和C++编程语言中,#pragma once是一个非标准但是被广泛支持的前置处理符号, 会让 ...
- linux终端相关概念解释及描述
基本概念: 1. tty(终端设备的统称): tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被 ...
- 【luoguP1797】 克鲁斯的加减法_NOI导刊2010提高(05)
题目描述: 奶牛克鲁斯认为人类的加法算式太落后了.比如说有时候想要用加法计算+15*3,只能写成+15+15+15,真是浪费精力啊!于是,克鲁斯决定开发出一种新的加法算式.当然新的算式也是建立在原本算 ...
- 从斐波那契数列看java方法的调用过程
先看斐波那契数列的定义: 斐波那契数列(Fibonacci sequence),又称黄金分割数列.因数学家列昂纳多·斐波那契(Leonardoda Fibonacci)以兔子繁殖为例子而引入,故又称为 ...
- oracle基本使用
一.数据库 1.1 主流数据库 微软: sql server .access 瑞典MySQL: AB公司mysql IBM公司: db2 美国Sybase公司:sybase 美国oracle公司: o ...
- codeforces163D
Large Refrigerator CodeForces - 163D 给定一个长方体的体积V,求出这个长方体的最小表面积. 输入 第一行有一个整数t (1 ≤ t ≤ 500) — 测试数据的组数 ...