【问题标题】:Installing python-qpid-proton fails on MacOSX python 3.8在 MacOSX python 3.8 上安装 python-qpid-proton 失败
【发布时间】:2020-10-06 04:35:46
【问题描述】:

这以前没有发生过,所以我不知道过去几个月发生了什么变化,但不幸的是,我发现自己不得不重新安装 python-qpid-proton,现在我遇到了我根本找不到好的解决方法的错误。

问题

如果我运行以下行:

pip install python-qpid-proton

我得到以下输出全部为红色:

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
    #error architecture not supported
     ^
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log.c:20:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log_private.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/log.h:23:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/logger.h:32:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/object.h:26:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/types.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/type_compat.h:75:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/types.h:79:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
    typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_dev_t;         /* dev_t */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
    typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
    typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
    typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
    typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
            ^
    note: '__uint128_t' declared here
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log.c:20:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log_private.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/log.h:23:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/logger.h:32:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/object.h:26:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/types.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/type_compat.h:75:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/types.h:81:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/endian.h:37:2: error: architecture not supported
    #error architecture not supported
     ^
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log.c:20:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log_private.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/log.h:23:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/logger.h:32:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/object.h:26:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/types.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/type_compat.h:75:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/types.h:95:9: error: unknown type name 'u_int64_t'
    typedef u_int64_t               u_quad_t;       /* quads */
            ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'xcrun' failed with exit status 1

我不确定此时我应该做什么,或者我是否应该去找创作者并报告这一点。任何帮助将不胜感激。

环境 - 编辑

我使用 Python 3.7,现在使用 3.8。我已经使用自制软件安装了它。 我不使用 Python 2.7 的 OSX 版本。 我还使用 virtualenv 来创建 Python 应用程序的环境。我必须重新安装 qpid 的原因是,如果我让我的解决方案静置一段时间(处理其他事情),然后我会再次使用它,它会中断。我认为原因是我无意中使用brew update 将python 从3.7 更新到了3.8。我可能不应该这样做。这打破了使用 python3.7 的 virtualenv。

如您所知,我为我的应用程序使用虚拟环境。我使用的是 3.8 python,当我在虚拟环境中运行pip install 时,会发生上述问题。

谢谢,

【问题讨论】:

    标签: python python-3.x pip qpid


    【解决方案1】:

    您使用的是什么 python 和环境? ...如果您不知道,您可能只是在 OSX 上使用标准/默认 python。

    您可能 a) 不想使用它并且 b) 不想尝试将新模块安装到其中,因为它被操作系统使用,安装到系统空间中,不是最新的python版本,作为用户项目的用户很难使用。

    如果您还没有,您应该尝试使用 python 分发/包管理器。我个人使用 Conda。

    如果您使用它,您可能不会遇到您在此处看到的问题类型。

    【讨论】:

    • 嗨,理查德。我已更新我的问题,以提供您在回答中所需的缺失信息。
    • 嗨,Paul - 我个人放弃了尝试使用自制软件来安装/使用 python 来解决类似问题,并切换到 Anaconda,在那里我没有遇到像你看到的任何问题。我完全不确定,但是您遇到的问题看起来像是在尝试安装轮子(编译模块),并且由于编译版本不适用于您的 XCode/OS 版本而出现问题。我个人无法提供任何帮助,除非我说过 - 我在尝试使用自制软件时遇到了类似的问题,并通过迁移到 anaconda 来解决它们。 ...对不起,我帮不了你了!
    • 奇怪的是 3.7 有效。这可能是 qpid 的一个真正问题,因为我让它腌制一段时间,同时我还在处理一些其他需要完成的任务。我将首先尝试将 python 降级回 3.7,看看我是否可以这样编译插件。不过,与此同时,我将研究 Anaconda,谢谢您的提示。
    【解决方案2】:

    好吧! Qpid Proton 看起来不适用于 3.8。 3.7.8安装Qpid Proton就好了。

    作为解决方案,我不得不绕过自制软件并使用 pyenv。

    使用 pyenv 的目录和 virtualenv,我能够成功地重新安装 qpid 并运行应用程序。我仍然必须回去清理自制软件并在那个生态圈上完全摆脱 python,这样我就可以使用 pyenv 来控制它。本质上,当 brew 更新到 3.8(我不知道)时,它破坏了我的代码。通过自制程序返回和降级似乎很昂贵,所以我选择使用另一个 python 环境工具。

    因此,如果您使用 Apache 的 Qpid Proton,请不要升级到 3.8。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-31
      • 2020-05-27
      • 1970-01-01
      • 2018-07-12
      • 2015-12-03
      • 2017-07-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多