python-3.x - 为什么我不能从 mac 终端安装 AppKit?
问题描述
尝试通过终端安装AppKit 通过终端,想使用语音识别,出现这个错误,我该如何解决,我需要安装pyobjc吗?
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/saqlainsajid/Library/Python/2.7/lib/python/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-build-env-Lim5sb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (31 lines):
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools
Using cached setuptools-44.1.0-py2.py3-none-any.whl (583 kB)
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Collecting pycairo
Downloading pycairo-1.18.2.tar.gz (200 kB)
Building wheels for collected packages: pycairo
WARNING: Building wheel for pycairo failed: [Errno 13] Permission denied: '/Users/saqlainsajid/Library/Caches/pip/wheels/8a'
Failed to build pycairo
Installing collected packages: setuptools, wheel, pycairo
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-install-JoFyAI/pycairo/setup.py'"'"'; __file__='"'"'/private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-install-JoFyAI/pycairo/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/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-record-GrpDGI/install-record.txt --single-version-externally-managed --prefix /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-build-env-Lim5sb/overlay --compile --install-headers /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-build-env-Lim5sb/overlay/include/python2.7/pycairo
cwd: /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-install-JoFyAI/pycairo/
Complete output (12 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-2.7
creating build/lib.macosx-10.15-x86_64-2.7/cairo
copying cairo/__init__.py -> build/lib.macosx-10.15-x86_64-2.7/cairo
copying cairo/__init__.pyi -> build/lib.macosx-10.15-x86_64-2.7/cairo
copying cairo/py.typed -> build/lib.macosx-10.15-x86_64-2.7/cairo
running build_ext
'pkg-config' not found.
Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']
----------------------------------------
ERROR: Command errored out with exit status 1: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-install-JoFyAI/pycairo/setup.py'"'"'; __file__='"'"'/private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-install-JoFyAI/pycairo/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/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-record-GrpDGI/install-record.txt --single-version-externally-managed --prefix /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-build-env-Lim5sb/overlay --compile --install-headers /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-build-env-Lim5sb/overlay/include/python2.7/pycairo Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/saqlainsajid/Library/Python/2.7/lib/python/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/cj/3q_3db6537gfp2g6fkntpy0h0000gp/T/pip-build-env-Lim5sb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.
解决方案
推荐阅读
- ios - iOS 15 核心数据与 CloudKit 公共数据库同步导致“自定义区域”不允许错误
- python - 使用python进行替换采样
- reactjs - 更改格式 html/css 以做出反应,但布局无法正常工作
- gradle - 如何创建一个调用许多其他 gradle 任务的 gradle 任务,包括使用不同的参数多次调用同一个任务
- reactjs - 查询不再有模拟响应:突变
- r - 在批处理 Rscript 中使用 R 密钥环库会产生“密钥不是字符串(长度为 1 个字符)”错误
- css - 在 Bootstrap 5 卡片标题中获取文本右对齐
- android - GitHub Gist API 限制
- php - 根据数据库可用性显示方面
- qt - 在 QML 中模糊背景