2

我对在 MacOS 10.7.2 版本上构建应用程序有疑问。好的,所以我已经成功地将我的应用程序捆绑在 10.5.8 上,但现在我们也需要一个 64 位发行版,所以我们正试图在 10.7.2 上构建它。这来自我看到的默认 64 位 python 2.7.1 和 py2app 0.5.3 作为默认值。

首先,我尝试运行相同的脚本,出现与模块图相关的错误:

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/modulegraph.py", line 352, in calc_setuptools_nspackages
for fn in os.listdir(entry):
OSError: [Errno 2] No such file or directory: '/WORK/TVB/tvb/build/bdist.macosx-10.7-intel/lib.macosx-10.7-intel-2.7'
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/modulegraph.py(352)calc_setuptools_nspackages()
for fn in os.listdir(entry):

好的,接下来我尝试在模块图中的那一行进行附加检查,以查看条目是否确实存在,这似乎可以修复错误并生成一个包。现在的问题是我们需要使用在

/目录/MacOS/python

产生额外的进程(这似乎在 10.5.8 生成的包中工作),但现在我得到:

sudo ./tvb start web backend
Starting to modify  pythonpath
done
python: posix_spawn: /WORK/TVB/tvb/TVB_MacOS_dist/TVB_distribution/tvb.app/Contents/MacOS/python2.7: No such file or directory

现在有效的打印让我看到实际上生成了一个应用程序,但生成新进程失败了,所以我恢复了所有更改并在 10.7.2 和 10.5.8 上尝试了一个简单的“hello.py”。

捆绑的应用程序适用于两者,但生成的 python 不:

So on 10.5.8:

            ./dist/hello.app/Contents/MacOS/hello

            <_Funct pt ...>

            Hello


            ./dist/hello.app.Contents/MacOS/python

            --starts a python 2.7.1 interpreter---


But on 10.7.2:

           ./dist/hello.app/Contents/MacOS/hello
           Hello

           ./dist/hello.app/Contents/MacOS/python
          python: posix_spawn: /WORK/TVB/TESt/dist/hello.app/Contents/MacOS/python2.7: No such file or directory

任何线索为什么会发生这种情况/解决方法?

4

0 回答 0