Unable to install certain tree-sitter packages from pypi
if i try to install
tree-sitter-markdown
, tree-sitter-json
, tree-sitter-toml
, tree-sitter-yaml
, tree-sitter-html
, tree-sitter-rust
, tree-sitter-xml
or tree-sitter-java
from pypi, it just fails
(also is it possible to get python 3.13 on termux?)32 Replies
in Termux, those packages are supposed to be installed from commands like
pkg install tree-sitter-markdown
, not pip install tree-sitter-markdown
how will it interface with python packages? i need it for
textual[syntax]
@NSPG911 if you would like to have python 3.13, that is understandable, but it takes a very long time to update that in Termux. Here is the discussion page for that if you are interested in helping to do it. https://github.com/termux/termux-packages/pull/24679
I am planning to help do it in the future but only after I finish all of my other PRs that are currently open
i want to have python 3.13 because the thing im working on is locked to python >= 3.13
yes
but im fine to downgrade it if necessary, just need the tree sitter packages
huh, the pr is closed
You didn't mention what errors you are seeing.
@NSPG911 does this work for you? this works for me
i prefer to use uv for my packages and stuff
so not sure how i would install it into the project
ok great but keep in mind that pure-venvs often don't work in Termux so if it doesn't work you might need an unsandboxed-venv
could you show me an example of the commands that you use to set up your project?
i remove the
project.requires-python
config from pyproject.toml then
error is this in
pip install tree-sitter-markdown
, does not happen when using pip install .
on the git repository
tree-sitter-markdown-inline/src/parser.c:3:10: fatal error: 'tree_sitter/parser.h' file not found
uv build .
in the directory fails, pip install .
works
whats the difference?does this work? I tried this
why does that work š
so like do i have to do that for everything else??
here is more information about that: https://github.com/termux/termux-packages/issues/23567#issuecomment-2692983425 what I referred to as "unsandboxed-venv", or what I mean by that, is the command "
python3 -m venv myenv --system-site-packages
"
probably but it's possible for us to make python-tree-sitter-X
packages for all of them by copying the way they are provided on Arch Linux AUR, but it can take a while to set up that
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-tree-sitter-markdownoh thats interesting, never used that before
should i proot-distro to archlinux?
if you would like to then you can yes, and arch linux has python 3.13
and normal venvs work there
is there any major differences between ubuntu (im assuming thats what termux uses) and arch, aside from apt and pacman?
i also have an issue with arch, it says
Warning: CPU doesn't support 32-but instructions, some software may not work.
actually the only thing that is really similar between ubuntu and termux is that they both use
apt
, everything else is more different from ubuntu than ubuntu is from arch linuxoh
if you compare them both to termux, then there actually aren't very many major differences between ubuntu and arch linux other than the package versions, the default settings of some things, the package manager, the preinstalled packages, and a bunch of other stuff that is actually less important than it seems when you compare both of them to Termux, which is significantly different from them on a deeper level
anyways so this wont be open again?
interesting, i have an 64-bit-ARM-only computer also where I am running Ubuntu and Termux, and I ran Arch Linux in a VM on it for a little while (and the VM would have also been affected by the 64-bit-only-ness), but I don't remember ever seeing that message yet
im on a oneplus 13r
no it will be reopened when someone is ready to finish it, the person who opened it closed it because they aren't ready to finish it yet
but anyone else can reopen it and finish it
also you can too if you know how to do it but it's very hard
oh im not at all interested in continuing it š
no clue about android app development in general
if you try arch linux in proot-distro and it says the same message again then let me know where you saw it and what command makes that message, and I can try it on my computer that is also 64 bit only and check if the same thing happens to me or not
wait I realized I can install the arch linux termux proot-distro on that computer right now too, I can follow along what you do and see if it happens to me from the exact thing you do, if you want
wow, thanks, I see the same message on my 64-bit only computer
it comes from proot-distro itself,
https://github.com/termux/proot-distro/blob/8f68053e346ee92219d325fa6d43e92922502a2e/proot-distro.sh#L689
arch linux ARM aarch64 is completely 64-bit I think, so I think it is just a warning and you are unlikely to see any real error from it