使用pyinstaller创建可执行文件时出错 [英] Error when creating executable file with pyinstaller

查看:99
本文介绍了使用pyinstaller创建可执行文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次尝试遇到错误时,我都会尝试使用pyinstaller为python脚本创建一个exe,可以在pastebin中找到该错误这里.

I'm trying to create an exe for my python script using pyinstaller each time it runs into errors which can be found in a pastebin here.

此外,当我双击exe文件时,它也会显示此错误:

Also when I double click the exe file it shows this error:

C:Users \ Afro \ AppData \ Local \ Temp_MEI51322 \ VCRUNTIME140.dll并非设计为在Windows上运行,或者包含错误.请尝试使用原始安装媒体再次安装程序,或与系统管理员或软件供应商联系以获取支持.错误状态0xc000007b

C:Users\Afro\AppData\Local\Temp_MEI51322\VCRUNTIME140.dll is either not designed to run on windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc000007b

然后是这个

加载Python DLL时出错: C:\ Users \ Afro \ AppData \ Local \ Temp_MEI51322 \ python35.dll(错误代码193)

Error loading Python DLL: C:\Users\Afro\AppData\Local\Temp_MEI51322\python35.dll(error code 193)

请问怎么了?

推荐答案

我曾遇到类似问题.在您的情况下,可能是UPX破坏了vcruntime140.dll. 解决方案是关闭UPX,因此只需在您的pyinstaller调用中添加-noupx .

I was haunted with similar issue. It might be that in your case UPX is breaking vcruntime140.dll. Solution to this is turning off UPX, so just add --noupx to your pyinstaller call.

pyinstaller --noupx --onedir --onefile --windowed get.py

此处的详细说明: UPX破坏了vcruntime140.dll(64位)

这篇关于使用pyinstaller创建可执行文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆