简体   繁体   English

Py2EXE无法创建可执行文件

[英]Py2EXE failing to create Executable

I'm trying to create an executable for a Python Project I'm working on. 我正在尝试为我正在处理的Python项目创建可执行文件。

I've been creating executable for a while, and today when I made a minor change to the program and tried to create the executable, it failed. 我创建可执行文件已有一段时间了,今天,当我对该程序进行较小的更改并尝试创建可执行文件时,它失败了。

I'm using the latest version of Python(x,y), with a full installation. 我正在使用最新版本的Python(x,y),并进行了完整安装。 The error I'm getting is: 我得到的错误是:

*** copy data files ***
copying ChangeLog -> V:\python\Project\dist\
copying C:\Python26\lib\site-packages\py2exe\run_w.exe -> V:\python\Project\dist\multimodel.exe
Adding python26.dll to V:\python\Project\dist\library.zip
error: Invalid argument

I've got Python(x,y) installed on another computer, and it compiled find, but then complained about missing modules. 我已经在另一台计算机上安装了Python(x,y),它编译了fin​​d,但是随后抱怨缺少模块。

Any pointers to debugging the problem ? 有任何调试问题的指针吗?

Are you accessing the project over a network drive? 您是否正在通过网络驱动器访问该项目?

I encountered this same problem when trying to use py2exe on a virtualbox virtual machine, with the source files located on a "virtualbox shared folder". 尝试在virtualbox虚拟机上使用py2exe时遇到同样的问题,其源文件位于“ virtualbox共享文件夹”上。 The error itself, it seems, occurs when read() tries to grab too big a chuck of data on a network drive: 当read()试图在网络驱动器上获取大量数据时,似乎会发生错误本身:

http://mail.python.org/pipermail/python-bugs-list/2006-May/033285.html http://mail.python.org/pipermail/python-bugs-list/2006-May/033285.html

And it seems the core problem won't be fixed. 而且似乎核心问题不会得到解决。 The error seemingly starts when the size of the exe file exceeds whatever limit causes this. 当exe文件的大小超出限制时,错误似乎开始。 The workaround for me was simply to copy it to the local drive. 对我来说,解决方法只是将其复制到本地驱动器。 After that it worked perfectly. 之后,它运行完美。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM