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!

macdhuibh
  • 220
  • 1
  • 2
  • 9

1 Answers1

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

Community
  • 1
  • 1
Ned Deily
  • 83,389
  • 16
  • 128
  • 151
  • 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. – macdhuibh Apr 18 '12 at 07:00
  • 2
    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: http://stackoverflow.com/questions/34845112/do-py2app-built-apps-require-a-python-installation – Pyderman Jan 18 '16 at 00:00
  • Hi Ned/macdhuibh, could you please let me know where did you updated the path and which exact path you updated ? – Saurabh Bisht Jul 16 '19 at 12:58