问题描述
这以前没有发生过,所以我不知道过去几个月中发生了什么变化,但是不幸的是,我发现自己不得不重新安装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和环境? ...如果不知道,您可能只是在OSX上使用标准/默认python。
您可能a)不想使用它,并且b)不想尝试将新模块安装到其中,因为它已被OS使用,已安装到系统空间中,不是最新的python版本,很难用作用户项目的用户。
如果您还没有,应该尝试使用python发行版/软件包管理器。我个人使用Conda。
就像使用它一样,您不会遇到这里看到的问题类型。
,好吧! Qpid Proton不能与3.8一起使用。 3.7.8可以很好地安装Qpid Proton。
作为解决方案,我不得不绕过自制程序并使用pyenv。
使用pyenv的目录和virtualenv,我能够成功重新安装qpid并运行该应用程序。我仍然必须回去清理自制软件,并完全在该生态圈上摆脱python,以便我可以使用pyenv来控制它。本质上,当brew更新到3.8(我不知道)时,它破坏了我的代码。回溯并通过自制软件降级似乎很昂贵,所以我选择使用另一个python环境工具。
因此,如果您使用的是来自Apache的Qpid Proton,那么任何人都不要升级到3.8。