仮想Python環境を使用してpy2appでアプリケーションを構築しようとしています。私はPython2.7.3を持っています。python 2.6(py2appをオンにしている)を使用してアプリを正常にビルドできますが、2.7.3 virtualenvを使用することはできません(2.7.3システム全体のインストールにpy2appをインストールできないため)。
これは私が得るエラーです:
running py2app
creating /Users/student/Desktop/Coding Projects/MCManager/build/bdist.macosx-10.6-intel/python2.7-standalone/app
creating /Users/student/Desktop/Coding Projects/MCManager/build/bdist.macosx-10.6-intel/python2.7-standalone/app/collect
creating /Users/student/Desktop/Coding Projects/MCManager/build/bdist.macosx-10.6-intel/python2.7-standalone/app/temp
creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/lib-dynload
creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/Frameworks
Traceback (most recent call last):
File "AppSpec.py", line 21, in <module>
app = ['ScriptUnix.py']
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/student/Desktop/VE/MyVirtEnv/lib/python2.7/site-packages/py2app/build_app.py", line 520, in run
self._run()
File "/Users/student/Desktop/VE/MyVirtEnv/lib/python2.7/site-packages/py2app/build_app.py", line 708, in _run
self.run_normal()
File "/Users/student/Desktop/VE/MyVirtEnv/lib/python2.7/site-packages/py2app/build_app.py", line 779, in run_normal
mf = self.get_modulefinder()
File "/Users/student/Desktop/VE/MyVirtEnv/lib/python2.7/site-packages/py2app/build_app.py", line 658, in get_modulefinder
debug=debug,
File "/Users/student/Desktop/VE/MyVirtEnv/lib/python2.7/site-packages/modulegraph/find_modules.py", line 271, in find_modules
find_needed_modules(mf, scripts, includes, packages)
File "/Users/student/Desktop/VE/MyVirtEnv/lib/python2.7/site-packages/modulegraph/find_modules.py", line 196, in find_needed_modules
path = m.packagepath[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
私はpy2appセットアップファイルのディレクトリにいて、それをで実行してい~/Desktop/VE/MyVirtEnv/bin/python AppSpec.py py2app
ます。同じことをで実行すると、正常に動作しpython26 AppSpec.py py2app
ます。