检查打包后,不能正常启动exe文件方法:
1、用pyinstaller -D xxx.py 生成文件夹
2、在Terminal中进入打包的目录下运行.exe文件(直接输入xxx.exe回车),查看错误
我的错误是
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\PyCharm2020.1\\workplace\\venv\\EXCEL\\dist\\xxx\\matplotlib\\mpl-data\\matplotlibrc'
[9496] Failed to execute script xxx
就是没有将matplotlibrc文件打包,通过搜索找到matplotlibrc文件,并放置在指定目录下,能够运行。但是不能生成单一的exe文件