Python 3.x 执行到exe。pyinstaller已成功安装,但exe。这不是工作。如何调试它
它在Python 3.x 执行到exe。pyinstaller已成功安装,但exe。这不是工作。如何调试它,python-3.x,Python 3.x,它在Spyder(Anaconda3)上工作,并通过pyinstaller执行脚本到exe,没有任何错误,但当我双击exe时没有发生任何事情(也尝试cx\u freeze,但仍然不起作用) 如何调试它?谢谢你的帮助 import os,shutil cur_path=os.path.dirname(__file__) sample_tree=os.walk(cur_path) for dirname,subdir,files in sample_tree: allfiles=[]
Spyder(Anaconda3)
上工作,并通过pyinstaller
执行脚本到exe,没有任何错误,但当我双击exe时没有发生任何事情(也尝试cx\u freeze
,但仍然不起作用)
如何调试它?谢谢你的帮助
import os,shutil
cur_path=os.path.dirname(__file__)
sample_tree=os.walk(cur_path)
for dirname,subdir,files in sample_tree:
allfiles=[]
basename=os.path.basename(dirname)
for file in files:
ext=file.split('.')[-1]
if ext=="csv":#讀取.csv to allfiles
allfiles.append(file)
elif ext=='log':#讀取.log to allfiles
allfiles.append(file)
for file in allfiles:#Copy csv and log of sample_tree to destfolder
destfile = cur_path
srcfile=dirname + "/" + file
shutil.move(srcfile,destfile)
p、 Python3.6/pyinstaller 3.3/Win 10的调试过程非常简单 在cx_Freeze中,您可以通过执行以下操作查找任何错误:
- 在构建之前,请确保脚本正常工作
- 从安装脚本生成时,请查看在将其转换为应用程序时是否出现任何错误或警告。如果您收到警告,请不要担心,即使应用程序正常运行,您也会收到这些警告。请确保您了解这些警告,因为它们可能会提示您为什么应用程序不工作
- 构建应用程序后,从命令行运行它。最后一步将显示任何错误
./yourappname
调试是一个非常简单的过程 在cx_Freeze中,您可以通过执行以下操作查找任何错误:
- 在构建之前,请确保脚本正常工作
- 从安装脚本生成时,请查看在将其转换为应用程序时是否出现任何错误或警告。如果您收到警告,请不要担心,即使应用程序正常运行,您也会收到这些警告。请确保您了解这些警告,因为它们可能会提示您为什么应用程序不工作
- 构建应用程序后,从命令行运行它。最后一步将显示任何错误
./yourappname