Benjamin-Loison/LibreTranslate

How to run in Termux?

Opened this issue · 7 comments

+8


Please do NOT ask question about LibreTranslate here! We have a forum at https://community.libretranslate.com for questions.

Please open an issue only to report faults and bugs.

For feature requests, please open pull requests directly! We accept all kinds of contributions. If you don't know how to code, you can still provide feedback, but please offer to contribute something (how are you going to help the project develop the feature?)

Remove these lines after reading it


./run.sh
Checking for docker...   can't find docker! Check that the program is installed and that you have added the proper path to the program to your PATH environment variable before launching the program. If you change your PATH environment variable, remember to close and reopen your terminal. https://www.docker.com/
apt show docker
Output:
Package: docker
Version: 1:24.0.6-2
Maintainer: @termux
Installed-Size: 85.4 MB
Depends: containerd, libdevmapper, resolv-conf
Homepage: https://docker.com
Download-Size: 18.0 MB
APT-Sources: https://is.mirror.flokinet.net/termux/termux-root root/stable aarch64 Packages
Description: Set of products that use OS-level virtualization to deliver software in packages called containers.
pkg install docker
Output:
Checking availability of current mirror:
[*] https://is.mirror.flokinet.net/termux/termux-main: ok
Hit:1 https://is.mirror.flokinet.net/termux/termux-main stable InRelease
Hit:2 https://is.mirror.flokinet.net/termux/termux-root root InRelease
Hit:3 https://is.mirror.flokinet.net/termux/termux-x11 x11 InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  containerd libdevmapper libseccomp runc
The following NEW packages will be installed:
  containerd docker libdevmapper libseccomp runc
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 43.9 MB of archives.
After this operation, 203 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 https://is.mirror.flokinet.net/termux/termux-main stable/main aarch64 libseccomp aarch64 2.5.5-3 [69.9 kB]
Get:2 https://is.mirror.flokinet.net/termux/termux-root root/stable aarch64 runc aarch64 1.1.13 [2476 kB]
Get:3 https://is.mirror.flokinet.net/termux/termux-root root/stable aarch64 containerd aarch64 1.6.21-3 [23.2 MB]
Get:4 https://is.mirror.flokinet.net/termux/termux-root root/stable aarch64 libdevmapper aarch64 2.03.24 [169 kB]
Get:5 https://is.mirror.flokinet.net/termux/termux-root root/stable aarch64 docker aarch64 1:24.0.6-2 [18.0 MB]
Fetched 43.9 MB in 7s (5943 kB/s)
Selecting previously unselected package libseccomp.
(Reading database ... 59740 files and directories currently installed.)
Preparing to unpack .../libseccomp_2.5.5-3_aarch64.deb ...
Unpacking libseccomp (2.5.5-3) ...
Selecting previously unselected package runc.
Preparing to unpack .../runc_1.1.13_aarch64.deb ...
Unpacking runc (1.1.13) ...
Selecting previously unselected package containerd.
Preparing to unpack .../containerd_1.6.21-3_aarch64.deb ...
Unpacking containerd (1.6.21-3) ...
Selecting previously unselected package libdevmapper.
Preparing to unpack .../libdevmapper_2.03.24_aarch64.deb ...
Unpacking libdevmapper (2.03.24) ...
Selecting previously unselected package docker.
Preparing to unpack .../docker_1%3a24.0.6-2_aarch64.deb ...
Unpacking docker (1:24.0.6-2) ...
Setting up libdevmapper (2.03.24) ...
Setting up libseccomp (2.5.5-3) ...
Setting up runc (1.1.13) ...

RunC requires support for devices cgroup support in kernel.

If CONFIG_CGROUP_DEVICE was enabled during compile time,
you need to run the following commands (as root) in order
to use the RunC:

  mount -t tmpfs -o mode=755 tmpfs /sys/fs/cgroup
  mkdir -p /sys/fs/cgroup/devices
  mount -t cgroup -o devices cgroup /sys/fs/cgroup/devices

If you got error when running commands listed above, this
usually means that your kernel lacks CONFIG_CGROUP_DEVICE.

Setting up containerd (1.6.21-3) ...
Setting up docker (1:24.0.6-2) ...
NOTE: Docker requires the kernel to support
device cgroups, namespace, VETH, among others.

To check a full list of features needed, run the script:
https://github.com/moby/moby/blob/master/contrib/check-config.sh
Processing triggers for man (1.14.6-1) ...
./run.sh
Output:
Checking for docker...   found
docker: Cannot connect to the Docker daemon at unix:///data/data/com.termux/files/usr/var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

docker-in-termux could help but looks overkill.

LibreTranslate/blob/d8ff2de3c3744e643fd114b1daee03e5db01cc40/README.md#install-and-run:

pip install libretranslate
Output:
Collecting libretranslate
  Downloading libretranslate-1.6.0-py3-none-any.whl.metadata (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.3/76.3 kB 3.4 MB/s eta 0:00:00
Collecting appdirs==1.4.4 (from libretranslate)
  Downloading appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting apscheduler==3.9.1 (from libretranslate)
  Downloading APScheduler-3.9.1-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting argos-translate-files==1.1.4 (from libretranslate)
  Downloading argos_translate_files-1.1.4-py3-none-any.whl.metadata (1.3 kB)
Collecting argostranslate==1.9.6 (from libretranslate)
  Downloading argostranslate-1.9.6-py3-none-any.whl.metadata (10 kB)
Collecting expiringdict==1.2.2 (from libretranslate)
  Downloading expiringdict-1.2.2-py3-none-any.whl.metadata (3.7 kB)
Collecting flask-babel==3.1.0 (from libretranslate)
  Downloading flask_babel-3.1.0-py3-none-any.whl.metadata (2.2 kB)
Collecting flask-limiter==2.6.3 (from libretranslate)
  Downloading Flask_Limiter-2.6.3-py3-none-any.whl.metadata (4.5 kB)
Collecting flask-session==0.4.0 (from libretranslate)
  Downloading Flask_Session-0.4.0-py2.py3-none-any.whl.metadata (924 bytes)
Collecting flask-swagger-ui==4.11.1 (from libretranslate)
  Downloading flask_swagger_ui-4.11.1-py3-none-any.whl.metadata (2.4 kB)
Collecting flask-swagger==0.2.14 (from libretranslate)
  Downloading flask-swagger-0.2.14.tar.gz (8.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting flask==2.2.5 (from libretranslate)
  Downloading Flask-2.2.5-py3-none-any.whl.metadata (3.9 kB)
Collecting itsdangerous==2.1.2 (from libretranslate)
  Downloading itsdangerous-2.1.2-py3-none-any.whl.metadata (2.9 kB)
Collecting langdetect==1.0.9 (from libretranslate)
  Downloading langdetect-1.0.9.tar.gz (981 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 981.5/981.5 kB 2.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting lexilang==1.0.1 (from libretranslate)
  Downloading LexiLang-1.0.1-py3-none-any.whl.metadata (2.4 kB)
Collecting morfessor==2.0.6 (from libretranslate)
  Downloading Morfessor-2.0.6-py3-none-any.whl.metadata (628 bytes)
Collecting packaging==23.1 (from libretranslate)
  Downloading packaging-23.1-py3-none-any.whl.metadata (3.1 kB)
Collecting polib==1.1.1 (from libretranslate)
  Downloading polib-1.1.1-py2.py3-none-any.whl.metadata (14 kB)
Collecting prometheus-client==0.15.0 (from libretranslate)
  Downloading prometheus_client-0.15.0-py3-none-any.whl.metadata (22 kB)
Collecting redis==4.4.4 (from libretranslate)
  Downloading redis-4.4.4-py3-none-any.whl.metadata (8.2 kB)
Collecting requests==2.31.0 (from libretranslate)
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
INFO: pip is looking at multiple versions of libretranslate to determine which version is compatible with other requirements. This could take a while.
Collecting libretranslate
  Downloading libretranslate-1.5.7-py3-none-any.whl.metadata (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.3/76.3 kB 619.7 kB/s eta 0:00:00
Collecting argostranslate==1.9.1 (from libretranslate)
  Downloading argostranslate-1.9.1-py3-none-any.whl.metadata (9.7 kB)
Collecting libretranslate
  Downloading libretranslate-1.5.6-py3-none-any.whl.metadata (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.3/76.3 kB 1.6 MB/s eta 0:00:00
  Downloading libretranslate-1.5.5-py3-none-any.whl.metadata (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.8/72.8 kB 2.3 MB/s eta 0:00:00
  Downloading libretranslate-1.5.4-py3-none-any.whl.metadata (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.5/72.5 kB 2.4 MB/s eta 0:00:00
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. (read timeout=15)")': /packages/24/8e/a760081c58e5af0914b85f26c11edb3d6f710e9e1e65004d174a3a7b2b6b/libretranslate-1.5.3-py3-none-any.whl.metadata
  Downloading libretranslate-1.5.3-py3-none-any.whl.metadata (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.1/72.1 kB 2.5 MB/s eta 0:00:00
Collecting flask==2.2.2 (from libretranslate)
  Downloading Flask-2.2.2-py3-none-any.whl.metadata (3.9 kB)
Collecting redis==4.3.4 (from libretranslate)
  Downloading redis-4.3.4-py3-none-any.whl.metadata (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.9/53.9 kB 3.2 MB/s eta 0:00:00
Collecting requests==2.28.1 (from libretranslate)
  Downloading requests-2.28.1-py3-none-any.whl.metadata (4.6 kB)
Collecting libretranslate
  Downloading libretranslate-1.5.2-py3-none-any.whl.metadata (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.1/71.1 kB 3.3 MB/s eta 0:00:00
  Downloading libretranslate-1.5.1-py3-none-any.whl.metadata (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.1/71.1 kB 3.9 MB/s eta 0:00:00
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/translatehtml/
Collecting translatehtml==1.5.2 (from libretranslate)
  Downloading translatehtml-1.5.2-py3-none-any.whl.metadata (888 bytes)
Collecting waitress==2.1.2 (from libretranslate)
  Downloading waitress-2.1.2-py3-none-any.whl.metadata (7.0 kB)
Collecting werkzeug==2.2.2 (from libretranslate)
  Downloading Werkzeug-2.2.2-py3-none-any.whl.metadata (4.4 kB)
Requirement already satisfied: setuptools>=0.7 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (70.2.0)
Requirement already satisfied: six>=1.4.0 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (1.16.0)
Requirement already satisfied: pytz in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (2024.1)
Requirement already satisfied: tzlocal!=3.*,>=2.0 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (5.2)
Collecting beautifulsoup4>=4.9.3 (from argos-translate-files==1.1.4->libretranslate)
  Downloading beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting lxml>=4.9.2 (from argos-translate-files==1.1.4->libretranslate)
  Downloading lxml-5.2.2.tar.gz (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 3.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of argostranslate to determine which version is compatible with other requirements. This could take a while.
INFO: pip is still looking at multiple versions of libretranslate to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
Collecting libretranslate
  Downloading libretranslate-1.5.0-py3-none-any.whl.metadata (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.1/71.1 kB 3.1 MB/s eta 0:00:00
  Downloading libretranslate-1.4.1-py3-none-any.whl.metadata (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.1/71.1 kB 4.7 MB/s eta 0:00:00
Collecting ltpycld2==0.42 (from libretranslate)
  Downloading LTpycld2-0.42.tar.gz (41.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 MB 2.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting libretranslate
  Downloading libretranslate-1.4.0-py3-none-any.whl.metadata (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.9/70.9 kB 1.5 MB/s eta 0:00:00
  Downloading libretranslate-1.3.13-py3-none-any.whl.metadata (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.9/70.9 kB 1.9 MB/s eta 0:00:00
Collecting argostranslate==1.8.2 (from libretranslate)
  Downloading argostranslate-1.8.2-py3-none-any.whl.metadata (9.6 kB)
Collecting libretranslate
  Downloading libretranslate-1.3.12-py3-none-any.whl.metadata (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.8/70.8 kB 3.7 MB/s eta 0:00:00
Collecting argostranslate==1.8.0 (from libretranslate)
  Downloading argostranslate-1.8.0-py3-none-any.whl.metadata (8.9 kB)
Collecting libretranslate
  Downloading libretranslate-1.3.11-py3-none-any.whl.metadata (31 kB)
Collecting argos-translate-files==1.1.1 (from libretranslate)
  Downloading argos_translate_files-1.1.1-py3-none-any.whl.metadata (1.3 kB)
Collecting libretranslate
  Downloading libretranslate-1.3.10-py3-none-any.whl.metadata (30 kB)
Collecting Flask-Babel==2.0.0 (from libretranslate)
  Downloading Flask_Babel-2.0.0-py3-none-any.whl.metadata (2.1 kB)
INFO: pip is still looking at multiple versions of argostranslate to determine which version is compatible with other requirements. This could take a while.
Collecting libretranslate
  Downloading libretranslate-1.3.9-py3-none-any.whl.metadata (29 kB)
Collecting argostranslate==1.7.5 (from libretranslate)
  Downloading argostranslate-1.7.5-py3-none-any.whl.metadata (9.1 kB)
Collecting libretranslate
  Downloading libretranslate-1.3.8-py3-none-any.whl.metadata (26 kB)
Collecting argos-translate-files==1.1.0 (from libretranslate)
  Downloading argos_translate_files-1.1.0-py3-none-any.whl.metadata (1.3 kB)
Collecting libretranslate
  Downloading libretranslate-1.3.7-py3-none-any.whl.metadata (26 kB)
Collecting argostranslate==1.7.0 (from libretranslate)
  Downloading argostranslate-1.7.0-py3-none-any.whl.metadata (9.3 kB)
Collecting libretranslate
  Downloading libretranslate-1.3.6-py3-none-any.whl.metadata (26 kB)
  Downloading libretranslate-1.3.5-py3-none-any.whl.metadata (25 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Downloading libretranslate-1.3.4-py3-none-any.whl.metadata (24 kB)
  Downloading libretranslate-1.3.3-py3-none-any.whl.metadata (23 kB)
  Downloading libretranslate-1.3.2-py3-none-any.whl.metadata (23 kB)
Collecting pyicu>=2.8 (from libretranslate)
  Downloading PyICU-2.13.1.tar.gz (262 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 262.4/262.4 kB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pycld2==0.41 (from libretranslate)
  Downloading pycld2-0.41.tar.gz (41.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 MB 2.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting polyglot==16.7.4 (from libretranslate)
  Downloading polyglot-16.7.4.tar.gz (126 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.3/126.3 kB 2.2 MB/s eta 0:00:00
ERROR: Exception:
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 179, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 391, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 427, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 239, in _attempt_to_pin_criterion
    criteria = self._get_updated_criteria(candidate)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 230, in _get_updated_criteria
    self._add_to_criteria(criteria, requirement, parent=candidate)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
    return bool(self._sequence)
           ^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 174, in __bool__
    return any(self)
           ^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 162, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 53, in _iter_built
    candidate = func()
                ^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 185, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 231, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 303, in __init__
    super().__init__(
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 235, in _prepare
    dist = self._prepare_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 314, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 527, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 598, in _prepare_linked_requirement
    local_file = unpack_url(
                 ^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 180, in unpack_url
    unpack_file(file.path, location, file.content_type)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/utils/unpacking.py", line 316, in unpack_file
    untar_file(filename, location)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_internal/utils/unpacking.py", line 235, in untar_file
    tar.extractall(location, filter=pip_filter)
  File "/data/data/com.termux/files/usr/lib/python3.11/tarfile.py", line 2265, in extractall
    self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(),
  File "/data/data/com.termux/files/usr/lib/python3.11/tarfile.py", line 2328, in _extract_one
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
  File "/data/data/com.termux/files/usr/lib/python3.11/tarfile.py", line 2419, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/data/data/com.termux/files/usr/lib/python3.11/tarfile.py", line 2517, in makelink
    self._extract_member(self._find_link_target(tarinfo),
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/tarfile.py", line 2723, in _find_link_target
    raise KeyError("linkname %r not found" % linkname)
KeyError: "linkname 'polyglot-16.7.4/docs/README.rst' not found"

Do not have this issue on Linux Mint 21.3 Cinnamon.

Search on DuckDuckGo and Google "linkname" "README.rst" "not found".

Seems related to pip/issues/12808.

apt update
Output:
Hit:1 https://is.mirror.flokinet.net/termux/termux-main stable InRelease
Hit:2 https://is.mirror.flokinet.net/termux/termux-root root InRelease
Hit:3 https://is.mirror.flokinet.net/termux/termux-x11 x11 InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
alias pipupdate="pip --disable-pip-version-check list --outdated --format=json | python3 -c \"import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))\" | grep -vE 'pip|blinker|numpy' | xargs -n1 pip install -U"
pipupdate
ERROR: You must give at least one requirement to install (see "pip help install")

Downgrading pip does not seem much possible in my case:

apt list -a python-pip
Output:
Listing... Done
python-pip/stable,now 24.1.1 all [installed,automatic]

Source: the Ask Ubuntu answer 92021

pip install .
Output:
Processing /data/data/com.termux/files/home/bens_folder/dev/gits/original/LibreTranslate
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting appdirs==1.4.4 (from libretranslate==1.5.5)
  Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting apscheduler==3.9.1 (from libretranslate==1.5.5)
  Using cached APScheduler-3.9.1-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting argos-translate-files==1.1.4 (from libretranslate==1.5.5)
  Using cached argos_translate_files-1.1.4-py3-none-any.whl.metadata (1.3 kB)
Collecting argostranslate==1.9.1 (from libretranslate==1.5.5)
  Using cached argostranslate-1.9.1-py3-none-any.whl.metadata (9.7 kB)
Collecting expiringdict==1.2.2 (from libretranslate==1.5.5)
  Using cached expiringdict-1.2.2-py3-none-any.whl.metadata (3.7 kB)
Collecting flask-babel==3.1.0 (from libretranslate==1.5.5)
  Using cached flask_babel-3.1.0-py3-none-any.whl.metadata (2.2 kB)
Collecting flask-limiter==2.6.3 (from libretranslate==1.5.5)
  Using cached Flask_Limiter-2.6.3-py3-none-any.whl.metadata (4.5 kB)
Collecting flask-session==0.4.0 (from libretranslate==1.5.5)
  Using cached Flask_Session-0.4.0-py2.py3-none-any.whl.metadata (924 bytes)
Collecting flask-swagger-ui==4.11.1 (from libretranslate==1.5.5)
  Using cached flask_swagger_ui-4.11.1-py3-none-any.whl.metadata (2.4 kB)
Collecting flask-swagger==0.2.14 (from libretranslate==1.5.5)
  Using cached flask-swagger-0.2.14.tar.gz (8.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting flask==2.2.5 (from libretranslate==1.5.5)
  Using cached Flask-2.2.5-py3-none-any.whl.metadata (3.9 kB)
Collecting itsdangerous==2.1.2 (from libretranslate==1.5.5)
  Using cached itsdangerous-2.1.2-py3-none-any.whl.metadata (2.9 kB)
Collecting langdetect==1.0.9 (from libretranslate==1.5.5)
  Using cached langdetect-1.0.9.tar.gz (981 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting lexilang==1.0.1 (from libretranslate==1.5.5)
  Using cached LexiLang-1.0.1-py3-none-any.whl.metadata (2.4 kB)
Collecting morfessor==2.0.6 (from libretranslate==1.5.5)
  Using cached Morfessor-2.0.6-py3-none-any.whl.metadata (628 bytes)
Collecting packaging==23.1 (from libretranslate==1.5.5)
  Using cached packaging-23.1-py3-none-any.whl.metadata (3.1 kB)
Collecting polib==1.1.1 (from libretranslate==1.5.5)
  Using cached polib-1.1.1-py2.py3-none-any.whl.metadata (14 kB)
Collecting prometheus-client==0.15.0 (from libretranslate==1.5.5)
  Using cached prometheus_client-0.15.0-py3-none-any.whl.metadata (22 kB)
Collecting redis==4.4.4 (from libretranslate==1.5.5)
  Using cached redis-4.4.4-py3-none-any.whl.metadata (8.2 kB)
Collecting requests==2.31.0 (from libretranslate==1.5.5)
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
INFO: pip is looking at multiple versions of libretranslate to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement torch==2.0.1 (from libretranslate) (from versions: none)
ERROR: No matching distribution found for torch==2.0.1

Until I have an open-source offline Linguee, thanks to Benjamin_Loison/Linguee_webscraper/issues/4, could use LibreTranslate with Termux to have something similar and that I need anyway.

Firefox Android seems to have the offline translation feature:

image