有人在 Snow Leopard 中成功构建了 PyObjC 应用程序吗?
如果你这样做了,你介意分享你是如何安装 pyobjc 的吗?我试图通过安装 PythonMac 2.5(对于通过 py2app 的独立包)并执行 PyObjC 的 easy_install
来做到这一点。我总是收到那些 deprecated
错误,主要是在 dyld.h
和 objc_inject.m
中声明的错误。
我尝试从源代码编译但仍然没有成功。
另外,当我在 Snow Leopard 下运行 Leopard 编译的 PyObjC 应用程序时,它出现有关 PyObjC 的错误,第一次是看不到 Foundation
或 AppKit
,第二次是 < code>typestr 未知。
感谢并感谢您的回答。
If you did, would you mind sharing how you did the pyobjc install? I was trying to do it by installing PythonMac 2.5 (for the standalone bundle thru py2app), and doing easy_install
of PyObjC. I always get those deprecated
errors, primarily those declared in dyld.h
, and inside objc_inject.m
.
I tried compiling from source but still no luck.
Also, when I run my Leopard-compiled PyObjC app under Snow Leopard, it has errors concerning PyObjC, first time was it can't see Foundation
or AppKit
, second was typestr
is unknown.
Thanks and appreciate your answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您安装 XCode Developer 工具(可选的 Snow Leopard 安装),则根本不需要手动安装 PyObjC。测试方法如下:
如果 Foundation、AppKit、ScriptingBridge、模块可以导入,那么一切都正常。
If you install the XCode Developer tools (optional Snow Leopard install), there's no need to manually install PyObjC at all. Here's how you can test it:
If the Foundation, AppKit, ScriptingBridge, modules can be imported, then everything is alright.
我已经找到了一种方法...虽然我不知道这是官方的还是什么...
我下载了 2.5 版本的 PythonMac,安装了它,然后在安装目录中添加了一个符号链接,例如:
这部分使它看起来好像捆绑的 PyObjC 二进制文件是 PythonMac 安装的一部分,当我执行
easy_install
时,系统站点包不会受到影响。另外,值得注意的是,您不应该通过easy_install
-ing py2app 与系统捆绑的 py2app 发生冲突,否则您将遇到 typestr 错误。我想知道这对于我能够在 Snow Leopard 下制作独立的 PyObjC 应用程序是否有任何问题。
I already found a way... though I dunno if this is official or what...
I downloaded 2.5 version of PythonMac, installed it, and then added a symlink inside the installation directory, e.g.:
This part made it seem as if the bundled PyObjC binaries are part of the PythonMac installation, and when I do
easy_install
, the system site-packages won't get affected. Also, worth noting is that you shouldn't conflict the system-bundled py2app byeasy_install
-ing py2app or else you'll encounter a typestr error.I wanna know if there's anything wrong with this for me to be able to make a standalone PyObjC application under Snow Leopard.