Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
525 views
in Technique[技术] by (71.8m points)

osx lion - py2app is not copying the Python.framework to the new app while using virutalenv

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...