【问题标题】:PyQt Make on mac giving errorPyQt Make on mac 给出错误
【发布时间】:2011-12-14 11:01:27
【问题描述】:

当试图让 PyQt 在 Macbook 上工作(使用雪豹)时,我收到以下错误:

警告:在 /Library/Frameworks/Python.framework/Python 中,文件中缺少所需的架构 x86_64

我已经安装了:

  1. xcode_3.2.6_and_ios_sdk_4.3.dmg

  2. Python 2.6.6

  3. qt-mac-opensource-4.7.4

  4. sip-4.12.4.tar.gz

一切顺利 This Tutorial

编译 PyQt 没问题,但是当我尝试 make 时,总是出现上述错误。

任何想法、示例、解决方案将不胜感激!

【问题讨论】:

    标签: macos build makefile installation pyqt


    【解决方案1】:

    啊哈!它不起作用,因为显然 python 2.6.6 是在 x64 环境中编译的,这就是它寻找 x64 类型文件的原因。使用 Python 2.7 x32 解决了这个问题。

    这是我为感兴趣的人所做的:

    注意:对于 x64 系统,安装 python 2.7 x64(惊喜,惊喜)并将所有“-arch=i386”更改为“-arch=x86_64”

    1。安装 Apple XCode

    2。安装 Python 2.7 x32

    3。安装qt-mac-opensource-4.7.4.dmg

    4。将 sip-4.12.4.tar.gz 和 PyQt-mac-gpl-4.8.5.tar.gz 放在桌面上。

    5。打开终端:

    6。在终端中,解压缩文件:

    tar xvfz sip-4.12.4.tar.gz

    tar xvfz PyQt-mac-gpl-4.8.5.tar.gz

    7。在终端中,构建并安装 sip:

    cd sip-4.12.4

    python2.7 configure.py --arch=i386

    制作

    sudo 安装

    8。在终端中,浏览回桌面:

    cd $HOME/桌面

    9。在终端中,构建并安装 PyQt:

    cd PyQt-mac-gpl-4.8.5

    python2.7 configure.py --use-arch=i386

    制作

    sudo 安装

    10.在终端中,测试 pyqt 是否正常工作:

    蟒蛇

    导入 PyQt4

    11.完成!!!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-15
      • 1970-01-01
      • 2011-12-01
      • 2021-05-24
      • 1970-01-01
      • 2021-05-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多