Cannot pip install numpy (and many other packages) in Termux (on an Android tablet)

485 views Asked by At

I was trying to edit some python scripts in my Android Tablet (Lenovo P11 2nd Gen, Android 13) using NVChad on Termux (v.0.118.0). NVChad works just fine, but (as stated in the tittle) I cannot pip install some packages in Termux. Weirdly enought, some packages work just fine. For example, pip install sympy installs sympy without any errors and it works just fine when running the code. However, I cannot import numpy, scipy, pandas, matplotlib, or any other such packages. For example, pip install numpy returns:

  Collecting numpy
  Using cached numpy-1.26.4.tar.gz (15.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error
  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [67 lines of output]
      Collecting patchelf>=0.11.0
        Using cached patchelf-0.17.2.1.tar.gz (167 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        ***(Something about building wheel and loading ninja. Everything ends with "done")***
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Building wheels for collected packages: patchelf, ninja
        Building wheel for patchelf (pyproject.toml): started
        Building wheel for patchelf (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
        × Building wheel for patchelf (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [11 lines of output]
            Traceback (most recent call last):
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-c35ylp3h/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
                cmkr = cmaker.CMaker(cmake_executable)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-c35ylp3h/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__
                self.cmake_version = get_cmake_version(self.cmake_executable)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-c35ylp3h/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
                raise SKBuildError(msg) from err
            Problem with the CMake installation, aborting build. CMake executable is cmake
            [end of output]
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for patchelf
        Building wheel for ninja (pyproject.toml): started
        Building wheel for ninja (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
        × Building wheel for ninja (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [15 lines of output]
            /data/data/com.termux/files/usr/tmp/pip-build-env-cca3tsj3/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
              warnings.warn("git archive did not support describe output")
            /data/data/com.termux/files/usr/tmp/pip-build-env-cca3tsj3/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
              warnings.warn("unprocessed git archival found (no export subst applied)")
            Traceback (most recent call last):
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-cca3tsj3/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
                cmkr = cmaker.CMaker(cmake_executable)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-cca3tsj3/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__
                self.cmake_version = get_cmake_version(self.cmake_executable)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-cca3tsj3/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
                raise SKBuildError(msg) from err
            Problem with the CMake installation, aborting build. CMake executable is cmake
            [end of output]
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for ninja
      Failed to build patchelf ninja
      ERROR: Could not build wheels for patchelf, ninja, which is required to install pyproject.toml-based projects
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

I did a bit of research and made sure to pkg update, pkg upgrade, pkg install openssl, pkg build-essential. I was hopping that was gonna be it, maybe install a couple more dependencies and it would be fixed. Instead, after installing build-essential without errors and trying pip install numpy again I got a huge error message. So long in fact, that StackOverflow won't let me post it on it's entirety. I had to remove some parts (with ***parenthesis*** explainning what is missing) It is as follows:

  Collecting numpy
  Using cached numpy-1.26.4.tar.gz (15.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error
  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [308 lines of output]
      Collecting patchelf>=0.11.0
        Using cached patchelf-0.17.2.1.tar.gz (167 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Building wheels for collected packages: patchelf
        Building wheel for patchelf (pyproject.toml): started
        Building wheel for patchelf (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
        × Building wheel for patchelf (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [286 lines of output]            -- Trying 'Ninja' generator            --
            CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
              Compatibility with CMake < 3.5 will be removed from a future version of
              CMake.
              Update the VERSION argument <min> value or use a ...<max> suffix to tell
              CMake that the project does not need compatibility with older versions.
            Not searching for unused variables given on the command line.
            -- The C compiler identification is Clang 17.0.6
            -- Detecting C compiler ABI info
            -- Detecting C compiler ABI info - done
            -- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - skipped
            -- Detecting C compile features
            -- Detecting C compile features - done
            -- The CXX compiler identification is Clang 17.0.6
            -- Detecting CXX compiler ABI info
            -- Detecting CXX compiler ABI info - done
            -- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ - skipped
            -- Detecting CXX compile features
            -- Detecting CXX compile features - done
            -- Configuring done (1.9s)
            -- Generating done (0.0s)
            -- Build files have been written to: /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/_cmake_test_compile/build
            --            -- Trying 'Ninja' generator - success            Configuring Project
              Working directory:
                /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/_skbuild/linux-aarch64-3.11/cmake-build
              Command:
                ***(A gigantic command)***
            Not searching for unused variables given on the command line.
            ***(A bit about the C compiler being Clang)***
            [1/9] Creating directories for 'build_patchelf'
            [2/9] No download step for 'build_patchelf'
            [3/9] No update step for 'build_patchelf'
            [4/9] Performing patch step for 'build_patchelf'
            autoreconf: export WARNINGS=all
            autoreconf: Entering directory '.'
            autoreconf: configure.ac: not using Gettext
            autoreconf: running: aclocal --force
            autoreconf: configure.ac: tracing
            autoreconf: configure.ac: creating directory build-aux
            autoreconf: configure.ac: not using Libtool
            autoreconf: configure.ac: not using Intltool
            autoreconf: configure.ac: not using Gtkdoc
            autoreconf: running: /data/data/com.termux/files/usr/bin/autoconf --force
            autoreconf: configure.ac: not using Autoheader
            autoreconf: running: automake --add-missing --copy --force-missing
            configure.ac:14: installing 'build-aux/compile'
            configure.ac:5: installing 'build-aux/install-sh'
            configure.ac:5: installing 'build-aux/missing'
            src/Makefile.am: installing 'build-aux/depcomp'
            parallel-tests: installing 'build-aux/test-driver'
            autoreconf: 'build-aux/install-sh' is updated
            autoreconf: Leaving directory '.'
            [5/9] Performing configure step for 'build_patchelf'
            checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c
            checking whether build environment is sane... yes
            checking for a race-free mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p
            checking for gawk... gawk
            checking whether make sets $(MAKE)... yes
            checking whether make supports nested variables... yes
            checking for strip... no
            checking for objdump... no
            checking for objcopy... no
            checking for readelf... no
            checking whether make supports the include directive... yes (GNU style)
            checking for gcc... gcc
            checking whether the C compiler works... yes
            checking for C compiler default output file name... a.out
            checking for suffix of executables...
            checking whether we are cross compiling... no
            checking for suffix of object files... o
            checking whether the compiler supports GNU C... yes
            checking whether gcc accepts -g... yes
            checking for gcc option to enable C11 features... none needed
            checking whether gcc understands -c and -o together... yes
            checking dependency style of gcc... gcc3
            checking for g++... g++
            checking whether the compiler supports GNU C++... yes
            checking whether g++ accepts -g... yes
            checking for g++ option to enable C++11 features... unsupported
            checking for g++ option to enable C++98 features... unsupported
            checking dependency style of g++... gcc3
            checking dependency style of gcc... gcc3
            checking whether g++ supports C++17 features with -std=c++17... yes
            checking that generated files are newer than configure... done
            configure: creating ./config.status
            config.status: creating Makefile
            config.status: creating src/Makefile
            config.status: creating tests/Makefile
            config.status: creating patchelf.spec
            config.status: executing depfiles commands
            [6/9] Performing build step for 'build_patchelf'
            FAILED: build_patchelf-prefix/src/build_patchelf-stamp/build_patchelf-build /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/_skbuild/linux-aarch64-3.11/cmake-build/build_patchelf-prefix/src/build_patchelf-stamp/build_patchelf-build
            cd /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream && /data/data/com.termux/files/usr/bin/make check && /data/data/com.termux/files/usr/bin/cmake -E touch /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/_skbuild/linux-aarch64-3.11/cmake-build/build_patchelf-prefix/src/build_patchelf-stamp/build_patchelf-build
            Making check in src
            make[1]: Entering directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/src'
            g++ -std=c++17 -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -Wall -std=c++17 -D_FILE_OFFSET_BITS=64     -g -O2 -MT patchelf.o -MD -MP -MF .deps/patchelf.Tpo -c -o patchelf.o patchelf.cc
            mv -f .deps/patchelf.Tpo .deps/patchelf.Po
            g++ -std=c++17 -Wall -std=c++17 -D_FILE_OFFSET_BITS=64     -g -O2   -o patchelf patchelf.o
            make[1]: Leaving directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/src'
            Making check in tests
            make[1]: Entering directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'
            /data/data/com.termux/files/usr/bin/make  simple-pie simple main too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections libfoo.so libfoo-scoped.so libbar.so libbar-scoped.so libsimple.so libbuildid.so libtoomanystrtab.so phdr-corruption.so libbig-dynstr.debug
            make[2]: Entering directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fPIC -pie -g -O2 -MT simple_pie-simple.o -MD -MP -MF .deps/simple_pie-simple.Tpo -c -o simple_pie-simple.o `test -f 'simple.c' || echo './'`simple.c
            gcc: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
            mv -f .deps/simple_pie-simple.Tpo .deps/simple_pie-simple.Po
            gcc -fPIC -pie -g -O2   -o simple-pie simple_pie-simple.o
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.     -g -O2 -MT simple-simple.o -MD -MP -MF .deps/simple-simple.Tpo -c -o simple-simple.o `test -f 'simple.c' || echo './'`simple.c
            mv -f .deps/simple-simple.Tpo .deps/simple-simple.Po
            gcc  -g -O2   -o simple simple-simple.o
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fpic -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
            mv -f .deps/main.Tpo .deps/main.Po
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fpic -g -O2 -MT foo.o -MD -MP -MF .deps/foo.Tpo -c -o foo.o foo.c
            mv -f .deps/foo.Tpo .deps/foo.Po
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fpic -g -O2 -MT bar.o -MD -MP -MF .deps/bar.Tpo -c -o bar.o bar.c
            mv -f .deps/bar.Tpo .deps/bar.Po
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.  -Wl,-rpath,`pwd`/no-such-path  -o libbar.so bar.o
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.   -o libfoo.so foo.o -lbar
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -Wl,-rpath-link=. -L.   -o main main.o -lfoo
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fpic -g -O2 -MT too-many-strtab.o -MD -MP -MF .deps/too-many-strtab.Tpo -c -o too-many-strtab.o too-many-strtab.c
            mv -f .deps/too-many-strtab.Tpo .deps/too-many-strtab.Po
            gcc  -g -O2 -c -o too-many-strtab2.o too-many-strtab2.s
            gcc -fpic -g -O2   -o too-many-strtab too-many-strtab.o too-many-strtab2.o
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.   -o libbar-scoped.so bar.o
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.   -o libfoo-scoped.so foo.o -lbar-scoped
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -Wl,-rpath-link=. -L.   -o main-scoped main.o -lfoo-scoped
            cat main.c > big-dynstr.c
            i=1; while [ $i -le 2000 ]; do echo "void f$i(void) { };"; i=$(($i + 1)); done >> big-dynstr.c
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fpic -g -O2 -MT big-dynstr.o -MD -MP -MF .deps/big-dynstr.Tpo -c -o big-dynstr.o big-dynstr.c                                                              mv -f .deps/big-dynstr.Tpo .deps/big-dynstr.Po
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -Wl,-rpath-link=. -L.   -o big-dynstr big-dynstr.o -lfoo
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.     -g -O2 -MT no_rpath-no-rpath.o -MD -MP -MF .deps/no_rpath-no-rpath.Tpo -c -o no_rpath-no-rpath.o `test -f 'no-rpath.c' || echo './'`no-rpath.c
            mv -f .deps/no_rpath-no-rpath.Tpo .deps/no_rpath-no-rpath.Po
            gcc  -g -O2   -o no-rpath no_rpath-no-rpath.o                     gcc  -g -O2 -c -o contiguous-note-sections.o contiguous-note-sections.s                                                             gcc -pie -g -O2 -nostdlib -T ./contiguous-note-sections.ld  -o contiguous-note-sections contiguous-note-sections.o                  ld.lld: warning: cannot find entry symbol _start; not setting start address
            make[2]: 'libfoo.so' is up to date.
            make[2]: 'libfoo-scoped.so' is up to date.
            make[2]: 'libbar.so' is up to date.                               make[2]: 'libbar-scoped.so' is up to date.
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.    -fpic -g -O2 -MT simple.o -MD -MP -MF .deps/simple.Tpo -c -o simple.o simple.c
            mv -f .deps/simple.Tpo .deps/simple.Po
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.   -o libsimple.so simple.o
            gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.  -Wl,--build-id  -o libbuildid.so simple.o                                     gcc -fpic -g -O2 -Wl,--disable-new-dtags -shared -L.   -o libtoomanystrtab.so too-many-strtab.o too-many-strtab2.o
            gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.17.2\" -DPACKAGE_STRING=\"patchelf\ 0.17.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.17.2\" -DHAVE_CXX17=1 -I.     -g -O2 -MT phdr_corruption_so-void.o -MD -MP -MF .deps/phdr_corruption_so-void.Tpo -c -o phdr_corruption_so-void.o `test -f 'void.c' || echo './'`void.c
            mv -f .deps/phdr_corruption_so-void.Tpo .deps/phdr_corruption_so-void.Po
            gcc  -g -O2 -nostdlib -shared -Wl,-T./phdr-corruption.ld  -o phdr-corruption.so phdr_corruption_so-void.o
            gcc -fPIC -shared -o libbig-dynstr.so big-dynstr.c
            only-keep-debug libbig-dynstr.so -o libbig-dynstr.debug                                                                             make[2]: only-keep-debug: No such file or directory
            make[2]: [Makefile:1615: libbig-dynstr.debug] Error 127 (ignored)                                                                   make[2]: Leaving directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'                                           /data/data/com.termux/files/usr/bin/make  check-TESTS
            make[2]: Entering directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'                                          only-keep-debug libbig-dynstr.so -o libbig-dynstr.debug                                                                             make[2]: only-keep-debug: No such file or directory
            make[2]: [Makefile:1615: libbig-dynstr.debug] Error 127 (ignored)
            make[3]: Entering directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'
            PASS: plain-fail.sh
            PASS: plain-run.sh
            PASS: shrink-rpath.sh
            PASS: set-interpreter-short.sh
            FAIL: set-interpreter-long.sh                                     FAIL: set-rpath.sh
            FAIL: add-rpath.sh                                                FAIL: no-rpath.sh
            FAIL: big-dynstr.sh
            PASS: set-rpath-library.sh
            PASS: soname.sh
            PASS: shrink-rpath-with-allowed-prefixes.sh                       PASS: set-rpath-rel-map.sh
            FAIL: force-rpath.sh                                              PASS: plain-needed.sh
            FAIL: output-flag.sh                                              PASS: too-many-strtab.sh
            FAIL: no-rpath-pie-powerpc.sh                                     FAIL: build-id.sh
            PASS: invalid-elf.sh                                              PASS: endianness.sh
            PASS: contiguous-note-sections.sh
            FAIL: no-gnu-hash.sh                                              PASS: change-abi.sh
            PASS: grow-file.sh                                                FAIL: no-dynamic-section.sh
            PASS: args-from-file.sh
            PASS: basic-flags.sh
            PASS: set-empty-rpath.sh                                          FAIL: phdr-corruption.sh
            FAIL: replace-needed.sh                                           FAIL: replace-add-needed.sh
            FAIL: add-debug-tag.sh
            PASS: empty-note.sh
            PASS: no-rpath-amd64.sh
            PASS: no-rpath-armel.sh
            PASS: no-rpath-armhf.sh
            PASS: no-rpath-hurd-i386.sh
            PASS: no-rpath-i386.sh
            PASS: no-rpath-ia64.sh
            PASS: no-rpath-kfreebsd-amd64.sh                                  PASS: no-rpath-kfreebsd-i386.sh
            PASS: no-rpath-mips.sh
            PASS: no-rpath-mipsel.sh
            PASS: no-rpath-powerpc.sh
            PASS: no-rpath-s390.sh
            PASS: no-rpath-sh4.sh
            PASS: no-rpath-sparc.sh                                           ============================================================================
            Testsuite summary for patchelf 0.17.2            # TOTAL: 48
            # PASS:  33                                                       # SKIP:  0
            # XFAIL: 0
            # FAIL:  15
            # XPASS: 0
            # ERROR: 0            See tests/test-suite.log            make[3]: *** [Makefile:944: test-suite.log] Error 1
            make[3]: Leaving directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'
            make[2]: *** [Makefile:1052: check-TESTS] Error 2
            make[2]: Leaving directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'                                           make[1]: *** [Makefile:1454: check-am] Error 2
            make[1]: Leaving directory '/data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/src/patchelf-upstream/tests'
            make: *** [Makefile:447: check-recursive] Error 1
            ninja: build stopped: subcommand failed.
            Traceback (most recent call last):
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-j1_i1fdp/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 674, in setup
                cmkr.make(make_args, install_target=cmake_install_target, env=env)                                                                File "/data/data/com.termux/files/usr/tmp/pip-build-env-j1_i1fdp/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 697, in make
                self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-j1_i1fdp/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 742, in make_impl
                raise SKBuildError(msg)

            An error occurred while building with CMake.
              Command:
                /data/data/com.termux/files/usr/bin/cmake --build . --target install --config Release --                                          Install target:
                install                                                         Source directory:
                /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3
              Working directory:                                                  /data/data/com.termux/files/usr/tmp/pip-install-qa3ercoq/patchelf_a4f55e4e6872436da81e30e2708da6e3/_skbuild/linux-aarch64-3.11/cmake-build
            Please check the install target is valid and see CMake's output for more information.

            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for patchelf
      Failed to build patchelf
      ERROR: Could not build wheels for patchelf, which is required to install pyproject.toml-based projects
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.                                              error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.                                                          │ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

I am at a loss. After checking, cmake appears to be installed (I again updated and upgraded the packages just to make sure). I also considered updating pip, but it seems to be forbiden on Termux, for some reason having to do with a python-pip package of sorts, but I couldn't find more information about it, at least related to simmilar errors. To clarify some other stuff, all my attempts of installing numpy (and the other packages) have been done directly on the Termux console, so I don't think NVChad is behind any of it.

I would be most grateful if anyone could help. I would be happy to provide any further information at your request. Help me Stack Overflow! You are my only hope!

PS: Sorry for bad English, not a native speaker.

2

There are 2 answers

2
Maxence Minon On

I think thats its because your device is not rooted.

0
NiGhTHawK On

The problem you are facing is that pip is trying to build the package (or one of its dependencies) and this is failing on the tablet.

As you mentioned in the comments above the solution is to install python-numpy using the package manager of the device's OS and not to install using pip.