PyQt4 库和 Mac OS 上的安装
已经有一段时间了,我在网上冲浪,试图找到在不同的 Mac 操作系统上成功安装 PyQt4 的方法,但我无法弄清楚。
有谁知道是否有一个我可以轻松安装而无需进行编译的软件包?
我正在使用 PyQt guis 开发一些 Python 工具,其想法是能够使它们在多个平台上工作。
任何打击都会受到赞赏, 干杯, 洛佐
it has been a while now I'm surfing the net trying to find the way to sucessfully install PyQt4 on different Mac OS's and I can't figure it out.
Does anybody know if there is out there a package I could easily install without having to go through the compiling?
I'm developing sone Python tools with PyQt guis and the idea is to be able to make them work on multy pltaforms.
Any hit would be gratly apreciated,
Cheers,
Lozo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看一下 py2app。它将把 python 脚本捆绑为 Mac OS .app 捆绑包。如果配置正确,其中将包含运行程序所需的 PyQt 和 Python 模块的副本。
对于在 Windows 上运行的打包,有 py2exe。同样,如果配置正确,它将处理将所有库复制到 .exe 所在的目录中。
从此时开始,无论是在 Mac 还是 Windows 上,您都可以创建安装程序、.dmg 等,以将 PyQt 应用程序分发并安装到这些平台上,而不必担心最终用户必须构建自己的 PyQt 副本。
Take a look at py2app. It will bundle up a python script as a Mac OS .app bundle. Inside of there, if configured correctly, will be the copies of the PyQt and Python modules needed to run the program.
For packaging for running on Windows, there's py2exe. Likewise, if configured correctly, it will handle copying all of the libraries into the directory the .exe is made.
From this point on either Mac or Windows, you can create an installer program, .dmg, etc., to distribute and install PyQt applications onto these platforms without having to worry about the end user having to build their own copies of PyQt.
您可以从 PyPM Index 安装 PyQt4。
You can install PyQt4 from PyPM Index.
从 QT然后使用Homebrew安装pyqt(google是你的朋友)。我建议查看 此网站 有关 Mac OS X Lion 的教程。
Install libraries from QT and then use Homebrew to install pyqt (google is your friend). I suggest looking at this site for a tutorial on Mac OS X Lion.