py2app 在使用 virutalenv 时不会将 Python.framework 复制到新应用程序 [英] py2app is not copying the Python.framework to the new app while using virutalenv

查看:99
本文介绍了py2app 在使用 virutalenv 时不会将 Python.framework 复制到新应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

环境:MacOS X 10.7.2,系统安装python 2.7.1、virtualenv 1.7.2、pyobjc 2.3、py2app 0.6.4+

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

我有一个新创建的 virtualenv,安装了 pyobc 2.3 和 py2app.当我运行 python setup.py py2app 来创建一个应用程序(例如在 py2app/examples/simple 中)时,一切似乎都可以编译并且它确实生成了一个可双击的应用程序,但是在单击该应用程序后,我收到以下错误:

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.

但是,如果我在 Lion 的标准安装中遵循相同的过程.该应用运行良好,符合预期.

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

关于如何让 virtualenv 和 py2app 相互配合的任何建议?

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

谢谢!

推荐答案

py2app 从不将系统 Python 复制到它生成的应用程序包中.如果您想制作一个可以部署在多个 OS X 版本上的独立应用程序,您需要将 py2app 与单独安装的 Python 一起使用,例如来自 python.org 安装程序.例如,请参见 Py2App 找不到标准模块

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

这篇关于py2app 在使用 virutalenv 时不会将 Python.framework 复制到新应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆