I'm trying to build an application with py2app using a virtual python environment. I have python 2.7.3. I can build the app fine using python 2.6 (which I have py2app on), but not with my 2.7.3 virtualenv (because I can't install py2app in my 2.7.3 system-wide installation).
This is the error I get:
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__'
I'm in the directory of the py2app setup file, running it with ~/Desktop/VE/MyVirtEnv/bin/python AppSpec.py py2app
. If I run the same thing with python26 AppSpec.py py2app
, it works fine.