前提
pythonモジュール(tree-sitter)のダウンロードができません
(例)
pip installを実行したもののできません
wheelファイルを直接ダウンロードしたもののできません
実現したいこと
インストールがしたい
発生している問題・エラーメッセージ
pip installの場合
% pip install tree-sitter Collecting tree-sitter Using cached tree_sitter-0.20.0.tar.gz (116 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: tree-sitter Building wheel for tree-sitter (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for tree-sitter (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [29 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-cpython-38 creating build/lib.macosx-10.9-x86_64-cpython-38/tree_sitter copying tree_sitter/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/tree_sitter running build_ext building 'tree_sitter.binding' extension creating build/temp.macosx-10.9-x86_64-cpython-38 creating build/temp.macosx-10.9-x86_64-cpython-38/tree_sitter creating build/temp.macosx-10.9-x86_64-cpython-38/tree_sitter/core creating build/temp.macosx-10.9-x86_64-cpython-38/tree_sitter/core/lib creating build/temp.macosx-10.9-x86_64-cpython-38/tree_sitter/core/lib/src gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/KO/opt/anaconda3/include -arch x86_64 -I/Users/KO/opt/anaconda3/include -arch x86_64 -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/Users/KO/opt/anaconda3/include/python3.8 -c tree_sitter/binding.c -o build/temp.macosx-10.9-x86_64-cpython-38/tree_sitter/binding.o -std=c99 -Wno-unused-variable gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/KO/opt/anaconda3/include -arch x86_64 -I/Users/KO/opt/anaconda3/include -arch x86_64 -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/Users/KO/opt/anaconda3/include/python3.8 -c tree_sitter/core/lib/src/lib.c -o build/temp.macosx-10.9-x86_64-cpython-38/tree_sitter/core/lib/src/lib.o -std=c99 -Wno-unused-variable In file included from tree_sitter/core/lib/src/lib.c:11: In file included from tree_sitter/core/lib/src/./lexer.c:5: tree_sitter/core/lib/src/./unicode.h:32:3: error: use of undeclared identifier 'UPRV_BLOCK_MACRO_BEGIN' U8_NEXT(string, i, length, *code_point); ^ tree_sitter/core/lib/src/unicode/utf8.h:351:34: note: expanded from macro 'U8_NEXT' #define U8_NEXT(s, i, length, c) U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, U_SENTINEL) ^ tree_sitter/core/lib/src/unicode/utf8.h:380:55: note: expanded from macro 'U8_INTERNAL_NEXT_OR_SUB' #define U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, sub) UPRV_BLOCK_MACRO_BEGIN { \ ^ 1 error generated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for tree-sitter Failed to build tree-sitter ERROR: Could not build wheels for tree-sitter, which is required to install pyproject.toml-based projects
wheelファイルを直接ダウンロードし、インストールしようとした場合のエラー
% pip install --no-deps tree_sitter-0.20.0-cp39-cp39-macosx_12_0_arm64.whl ERROR: tree_sitter-0.20.0-cp39-cp39-macosx_12_0_arm64.whl is not a supported wheel on this platform.
試したこと
wheelファイルを直接ダウンロードした
補足情報(FW/ツールのバージョンなど)
環境はmac airでm1チップです