簡體   English   中英

無法為 python 3.8.0 安裝 pyobjc-core MacO(命令“gcc”失敗,退出狀態為 1)

[英]Cannot install pyobjc-core MacOs for python 3.8.0 (command 'gcc' failed with exit status 1)

操作系統:macOS 大蘇爾:11.0.1 Python:3.8.0

嘗試安裝 pyobjc-core==5.2 以滿足“自動化無聊的東西”一書的要求。

我在網上嘗試了很多建議的修復方法,但還沒有找到針對這種特殊情況的解決方案。 能夠在我的 windows 機器上安裝所有這些,但我不熟悉 macOS。

這是 output:

    Running setup.py install for pyobjc-core ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-0ayo2s8h/pyobjc-core/setup.py'"'"'; __file__='"'"'/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-0ayo2s8h/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-record-xdak7whs/install-record.txt --single-version-externally-managed --compile --user --prefix=
         cwd: /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-0ayo2s8h/pyobjc-core/
    Complete output (195 lines):
    running install
    running build
    running build_py
    Overriding build_packages to copy PyObjCTest
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_bridges.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_protocols.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_sequence.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsset.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_pycoder.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_lazyimport.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsstring.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_framework.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsdecimal.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_properties.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_callable_docstr.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_context.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_locking.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_descriptors.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_bridgesupport.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsdictionary.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_pythonify.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsarray.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsobject.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_category.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_compat.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_mapping.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_dyld.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    copying Lib/objc/_convenience_nsdata.py -> build/lib.macosx-10.9-x86_64-3.8/objc
    creating build/lib.macosx-10.9-x86_64-3.8/PyObjCTools
    copying Lib/PyObjCTools/Signals.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTools
    copying Lib/PyObjCTools/TestSupport.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTools
    copying Lib/PyObjCTools/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTools
    copying Lib/PyObjCTools/KeyValueCoding.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTools
    copying Lib/PyObjCTools/MachSignals.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTools
    creating build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_voidpointer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_specialtypecodes_unichar.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test2_filepointer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_fsref.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_methodedits.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_bundleFunctions.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_specialtypecodes_struct.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_dict_proxy.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_callbacks.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_weakref.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_testsupport.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_protocol.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_methods.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_objcpointer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_inspect_signatures.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_archiving_interop.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_dyld.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_copying.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_nsdate_proxy.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_metadata_inheritance.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_assocations.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_classandinst.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_archiving_secure_interop.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_splitsig.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_pickling_objc.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_pickle.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_clinmeth.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test3_filepointer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_bridges.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_convenience.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_metadata_function.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_version_support.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_bundleVariables.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test3_dict_interface.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_list_proxy.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_blocks.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_array_interface.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_allocatebuffer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_deprecations.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_synthesize.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_propertiesforclass.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_specialtypecodes_charbyte.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_varargs.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_usekvo.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_metadata.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_exceptions.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_hidden_selector.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_bridgesupport.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_keyvalue.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_specialtypecodes_nsbool.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_subclass.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test2_dict_interface.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_nsdecimal.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_pointer_compat.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_set_interface.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_NULL.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_protocolNamed.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_signatures.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_classhooks.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_conversion.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_python_method.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_arrays.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_metadata_py2py.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_set_property.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_methods2.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_methres.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/fnd.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_initialized.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_method_prototypes.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_specialtypecodes_charint.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/loader.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_keyvaluecoding.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_metadata_py.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_default_selector.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_objc.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_structs.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test3_protocol.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_corefoundation.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_identity.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_compat.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_imp.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test3_typecheck.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_regr.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_nsdata.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_outputinitializer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_set_proxy.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_locking.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/helper_bridgesupport.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_archive_python.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_array_property.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_object_property.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_context.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_structpointer.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_lazy_import.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/dejagnu.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_number_proxy.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_dict_property.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_methodlookup.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_ivar.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_descriptors.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_protected.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_callable_docstr.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_framework.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_ctests.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test2_dictviews.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/keyvaluehelper.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_sockaddr.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_keyvalue_prop.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_constants.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_posing.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_bridged_classes.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_metadata_imp.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_methodaccess.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_opaque.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_leaks.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    copying PyObjCTest/test_specialtypecodes_methdef.py -> build/lib.macosx-10.9-x86_64-3.8/PyObjCTest
    running build_ext
    building 'objc._objc' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/Modules
    creating build/temp.macosx-10.9-x86_64-3.8/Modules/objc
    creating build/temp.macosx-10.9-x86_64-3.8/libffi-src
    creating build/temp.macosx-10.9-x86_64-3.8/libffi-src/powerpc
    creating build/temp.macosx-10.9-x86_64-3.8/libffi-src/x86
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c Modules/objc/OC_PythonData.m -o build/temp.macosx-10.9-x86_64-3.8/Modules/objc/OC_PythonData.o -g -fexceptions -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Ilibffi-src/include -Ilibffi-src/powerpc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -DPyObjC_BUILD_RELEASE=1100
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c Modules/objc/objc_support.m -o build/temp.macosx-10.9-x86_64-3.8/Modules/objc/objc_support.o -g -fexceptions -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Ilibffi-src/include -Ilibffi-src/powerpc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -DPyObjC_BUILD_RELEASE=1100
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c Modules/objc/helpers-foundation-nscoder.m -o build/temp.macosx-10.9-x86_64-3.8/Modules/objc/helpers-foundation-nscoder.o -g -fexceptions -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Ilibffi-src/include -Ilibffi-src/powerpc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -DPyObjC_BUILD_RELEASE=1100
    Modules/objc/helpers-foundation-nscoder.m:335:37: error: too many arguments to function call, expected 0, have 4
                (void)objc_msgSendSuper(&super,
                      ~~~~~~~~~~~~~~~~~ ^~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/objc/message.h:66:1: note: 'objc_msgSendSuper' declared here
    OBJC_EXPORT void
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/objc/objc-api.h:242:25: note: expanded from macro 'OBJC_EXPORT'
    #   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
                            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/objc/objc-api.h:231:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    Modules/objc/helpers-foundation-nscoder.m:451:37: error: too many arguments to function call, expected 0, have 5
                (void)objc_msgSendSuper(&super,
                      ~~~~~~~~~~~~~~~~~ ^~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/objc/message.h:66:1: note: 'objc_msgSendSuper' declared here
    OBJC_EXPORT void
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/objc/objc-api.h:242:25: note: expanded from macro 'OBJC_EXPORT'
    #   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
                            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/objc/objc-api.h:231:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    2 errors generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-0ayo2s8h/pyobjc-core/setup.py'"'"'; __file__='"'"'/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-0ayo2s8h/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-record-xdak7whs/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
****@****s-MacBook-Air desktop % 

好吧,我安裝了 brew,然后使用 brew 安裝了 zlib 和 libpng,在嘗試再次安裝 pyobjc-core 后,產生的錯誤是 CalledProcessError。

****@****s-MacBook-Air desktop % pip3 install --user pyobjc-core==5.2
Collecting pyobjc-core==5.2
  Using cached https://files.pythonhosted.org/packages/d3/f5/07579f2986f2eb639932626f69a082598f5e6d4535e1f54a331d9efa97d7/pyobjc-core-5.2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/setup.py'"'"'; __file__='"'"'/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info
         cwd: /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/
    Complete output (47 lines):
    running egg_info
    creating /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info
    writing include/pyobjc-compat.h to /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/include/pyobjc-compat.h
    writing include/pyobjc-api.h to /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/include/pyobjc-api.h
    writing /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/PKG-INFO
    writing dependency_links to /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/dependency_links.txt
    writing namespace_packages to /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/namespace_packages.txt
    writing top-level names to /private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/top_level.txt
    writing manifest file '/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/pip-egg-info/pyobjc_core.egg-info/SOURCES.txt'
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/setup.py", line 695, in <module>
        setup(
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/setup.py", line 364, in run
        egg_info.egg_info.run(self)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 296, in run
        self.find_sources()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
        mm.run()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 534, in run
        self.add_defaults()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
        sdist.add_defaults(self)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/sdist.py", line 228, in add_defaults
        self._add_defaults_ext()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/sdist.py", line 311, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 299, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/private/var/folders/fc/z49hllzx5s7_s2wbbtpn3j4r0000gn/T/pip-install-v4_nrcm7/pyobjc-core/setup.py", line 535, in finalize_options
        self.sdk_root = subprocess.check_output(
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 512, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['/usr/bin/xcodebuild', '-version', '-sdk', 'macosx', 'Path']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

好吧,我假設 pyobjc/core/frameworkQuartz 的新版本在遵循我一直在閱讀的書中時會以類似的方式工作。 所以我繼續並停止嘗試安裝所述書中提到的那些特定版本。

安裝最新版本 7.0.1 后沒有更多問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM