我在 Fedora 18 上使用 py2app 时遇到了问题:
running py2app
creating /run/media/vik2015/D0DD-6FB2/MacEdit/build/bdist.linux-x86_64/python2.7-semi_standalone/app
creating /run/media/vik2015/D0DD-6FB2/MacEdit/build/bdist.linux-x86_64/python2.7-semi_standalone/app/collect
creating /run/media/vik2015/D0DD-6FB2/MacEdit/build/bdist.linux-x86_64/python2.7-semi_standalone/app/temp
creating build/bdist.linux-x86_64/python2.7-semi_standalone/app/lib-dynload
creating build/bdist.linux-x86_64/python2.7-semi_standalone/app/Frameworks
*** using recipe: virtualenv ***
*** using recipe: email ***
*** filtering dependencies ***
351 total
342 filtered
0 orphaned
9 remaining
*** create binaries ***
*** byte compile python files ***
byte-compiling /usr/lib/python2.7/site-packages/pkg_resources.py to pkg_resources.pyc
*** creating application bundle: do_it ***
skipping byte-compilation of /run/media/vik2015/D0DD-6FB2/MacEdit/dist/do_it.app/Contents/Resources/site.py to site.pyc
copying do_it.py -> /run/media/vik2015/D0DD-6FB2/MacEdit/dist/do_it.app/Contents/Resources
creating /run/media/vik2015/D0DD-6FB2/MacEdit/dist/do_it.app/Contents/Resources/lib
creating /run/media/vik2015/D0DD-6FB2/MacEdit/dist/do_it.app/Contents/Resources/lib/python2.7
error: Operation not permitted
如果有帮助,这是我的setup.py
from setuptools import setup
APP = ['do_it.py']
OPTIONS = {'argv_emulation': True, 'includes': [],}
setup(
app=APP,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
和do_it.py
import os
os.system("python program.py")