1

我正在使用 cx_freeze 捆绑我的应用程序。我有 2 个问题。

1) 我正在使用 OSX Mountain Lion - 我拥有的 /build/exe.macosx-10.8-x86_64-2.7 - 它是否包含适用于 Windows、Linux 的可执行文件 - 如果是这样,我可以在列表的哪个位置找到它?我的原始脚本是 cpu.py。该目录包含很多“.so”文件和 1 个“cpu”文件。

2)当我从上面的列表中尝试“cpu”时,我得到了这个输出。'psutil' 是脚本所需的 Python 模块 - cpu.py。

Desktop/build/exe.macosx-10.8-x86_64-2.7/cpu ; exit;
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cx_Freeze/initscripts/Console.py", line 27, in    <module>
exec code in m.__dict__
File "cpu.py", line 6, in <module>
File "/usr/local/lib/python2.7/site-packages/psutil/__init__.py", line 102, in <module>
import psutil._psosx as _psplatform
File "/usr/local/lib/python2.7/site-packages/psutil/_psosx.py", line 14, in <module>
import _psutil_osx
File "build/bdist.macosx-10.8-x86_64/egg/_psutil_osx.py", line 7, in <module>
File "build/bdist.macosx-10.8-x86_64/egg/_psutil_osx.py", line 4, in __bootstrap__
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 945, in resource_filename
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 1626, in get_resource_filename
NotImplementedError: resource_filename() only supported for .egg, not .zip
logout
4

0 回答 0