在 mac 上安装 pyobjc 时出现错误
I get an error when I install pyobjc on my mac
我已经成功安装了pyobjc-core,但是当我尝试安装pyobjc时,出现错误:
(第一部分)
错误:命令出错,退出状态为 1:
命令:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"'; file='"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',打开)(文件);code=f.read().replace('"'"'\r\n'"'"', '"'"'\ n'"'"');f.close();exec(编译(代码, 文件, '"'"'exec'"'"'))' install --record /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-record-2nxnxwsn/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/ pyobjc-框架-Cocoa
cwd: /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/
(最后一部分)
错误:命令出错,退出状态为 1:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"'; file='"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',打开)(文件);code=f.read().replace('"'"'\r\n'"'"', '"'"'\ n'"'"');f.close();exec(编译(代码, 文件, '"'"'exec'"'"'))' install --record /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-record-2nxnxwsn/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/ pyobjc-framework-Cocoa 检查日志以获得完整的命令输出。
尝试使用不同的 Python 版本,目前并非所有库都有 3.9 的轮子。
我已经成功安装了pyobjc-core,但是当我尝试安装pyobjc时,出现错误:
(第一部分)
错误:命令出错,退出状态为 1: 命令:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"'; file='"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',打开)(文件);code=f.read().replace('"'"'\r\n'"'"', '"'"'\ n'"'"');f.close();exec(编译(代码, 文件, '"'"'exec'"'"'))' install --record /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-record-2nxnxwsn/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/ pyobjc-框架-Cocoa cwd: /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/
(最后一部分)
错误:命令出错,退出状态为 1:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"'; file='"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',打开)(文件);code=f.read().replace('"'"'\r\n'"'"', '"'"'\ n'"'"');f.close();exec(编译(代码, 文件, '"'"'exec'"'"'))' install --record /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-record-2nxnxwsn/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/ pyobjc-framework-Cocoa 检查日志以获得完整的命令输出。
尝试使用不同的 Python 版本,目前并非所有库都有 3.9 的轮子。