py2app is not copying the Python.framework to the new app while using virutalenv
Asked Answered
C

1

10

environment: MacOS X 10.7.2, system installed python 2.7.1, virtualenv 1.7.2, pyobjc 2.3, py2app 0.6.4+

I have a newly created virtualenv with pyobc 2.3 and py2app installed. When I run python setup.py py2app to create an app (for example in py2app/examples/simple) everything seems to compile and it does produce a double clickable app, but after clicking on that app I get the following error:

A Python runtime not could be located.  You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this application's Info.plist file.

However, if i follow the same process in the standard install of Lion. The app functions well and as expected.

Any suggestions on how I can make virtualenv and py2app play nicely with one another?

Thanks!

Consummation answered 17/4, 2012 at 4:16 Comment(0)
A
12

py2app never copies a system Python into an app bundle that it produces. If you want to make a standalone app that can be deployed on multiple versions of OS X, you need to use py2app with a separately-installed Python, like from a python.org installer. See, for example, Py2App Can't find standard modules

Anele answered 17/4, 2012 at 6:1 Comment(3)
Thank you for you help. I installed python 2.7 from with brew and edit my PATH accordingly. I can now build/compile the py2app/examples/simple and hopefully much more. Thanks again.Consummation
Ned, I have built within a pyenv which downloaded it's own 2.6 Python (within the pyenv, which python returns /Users/Pyderman/.pyenv/shims/python), yet am encountering the same issue: #34845612Karame
Hi Ned/macdhuibh, could you please let me know where did you updated the path and which exact path you updated ?Uyekawa

© 2022 - 2024 — McMap. All rights reserved.