Py2exe - Pmw WindowsError: [错误 3] [英] Py2exe - Pmw WindowsError: [Error 3]

查看:62
本文介绍了Py2exe - Pmw WindowsError: [错误 3]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Py2exe 构建我的独立可执行文件.我已经导入了 Pmw 类.当我运行 stanalone 可执行文件时,出现此错误:

I am trying to build my standalone executable using Py2exe. I have imported the Pmw class. When I run the stanalone excutable, I get this error:

Traceback (most recent call last):
   File "----.py", line 9, in <module>
   File "zipextimporter.pyc", line 82, in load_module
   File "Pmw\__init__.pyc", line 28, in <module>

WindowsError: [Error 3] The system cannot find the path specified:'C:\\Users\\Administrator\\PycharmProjects\\---\\dist\\-----_pmw.exe\\Pmw/*.*'

我搜索了此错误,但找不到任何解决方案为什么我会收到此回溯错误?.

I searched this error, but I was not able to find any solution to it Why do i get this traceback error? .

推荐答案

终于找到了解决方案:

首先,您需要按照以下命令运行 C​​:\Python27\Lib\site-packages\Pmw\build\lib\Pmw\Pmw_1_3\bin 文件夹中的 bundlepmw.py:python bundlepmw.py C:\Python27\Lib\site-packages\Pmw\Pmw_1_3\lib 来创建 Pmw.py.

First, you need to run the bundlepmw.py in the C:\Python27\Lib\site-packages\Pmw\build\lib\Pmw\Pmw_1_3\bin folder following this command: python bundlepmw.py C:\Python27\Lib\site-packages\Pmw\Pmw_1_3\lib to create the Pmw.py.

阅读本页:folk.uio.no/hpl/scripting/doc/python/Pmw/dynamicloader.html,根据这个链接修改bundlepmw.py后sourceforge.net/p/pmw/discussion/33675/thread/f0bd7f34.您应该能够生成 Pmw.py 文件.

Read this page: folk.uio.no/hpl/scripting/doc/python/Pmw/dynamicloader.html, after fixing the bundlepmw.py based on this link sourceforge.net/p/pmw/discussion/33675/thread/f0bd7f34. You should be able to generate the Pmw.py file.

然后将 Pmw.py 加上 PmwBlt.py 和 PmwColor.py 复制到主脚本目录中并运行您的 setup.py.甜

Then copy the Pmw.py plus PmwBlt.py and PmwColor.py into the main script directory and run your setup.py. Sweet

这篇关于Py2exe - Pmw WindowsError: [错误 3]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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