pythonandroidpiptermuxtermux-linux

Termux error subprocess-exited-with-error


Hello guys I need a help for this error. When I tried to install pip install -r requirements.txt I was facing this subprocess error in termux. I have tried upgrading/degrading pip even then it shows this error. This is not only for installing requirement.txt. this happens when I used to install anything using pip

I'm beginner please help me guys.


~/Bad-Robo $ pip install -r requirements.txt

Collecting requests (from -r requirements.txt (line 1))

  Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)

Collecting instabot (from -r requirements.txt (line 2))

  Downloading instabot-0.117.0.tar.gz (84 kB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Preparing metadata (pyproject.toml) ... done

Collecting charset-normalizer<4,>=2 (from requests->-r requirements.txt (line 1))

  Downloading charset_normalizer-3.4.0-py3-none-any.whl.metadata (34 kB)

Collecting idna<4,>=2.5 (from requests->-r requirements.txt (line 1))

  Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)

Collecting urllib3<3,>=1.21.1 (from requests->-r requirements.txt (line 1))

  Downloading urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)

Collecting certifi>=2017.4.17 (from requests->-r requirements.txt (line 1))

  Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)

Collecting chardet>=3.0.4 (from instabot->-r requirements.txt (line 2))

  Downloading chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)

Collecting future>=0.18.2 (from instabot->-r requirements.txt (line 2))

  Downloading future-1.0.0-py3-none-any.whl.metadata (4.0 kB)

Collecting huepy>=1.2.1 (from instabot->-r requirements.txt (line 2))

  Downloading huepy-1.2.1.tar.gz (15 kB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Preparing metadata (pyproject.toml) ... done

Collecting pysocks>=1.7.1 (from instabot->-r requirements.txt (line 2))

  Downloading PySocks-1.7.1-py3-none-any.whl.metadata (13 kB)

Collecting pytz>=2019.3 (from instabot->-r requirements.txt (line 2))

  Downloading pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)

Collecting requests-toolbelt>=0.9.1 (from instabot->-r requirements.txt (line 2))

  Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl.metadata (14 kB)

Collecting responses>=0.10.9 (from instabot->-r requirements.txt (line 2))

  Downloading responses-0.25.3-py3-none-any.whl.metadata (46 kB)

Collecting schedule>=0.6.0 (from instabot->-r requirements.txt (line 2))

  Downloading schedule-1.2.2-py3-none-any.whl.metadata (3.8 kB)

Collecting six>=1.14.0 (from instabot->-r requirements.txt (line 2))

  Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)

Collecting tqdm>=4.41.1 (from instabot->-r requirements.txt (line 2))

  Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)

Collecting mock>=3.0.5 (from instabot->-r requirements.txt (line 2))

  Downloading mock-5.1.0-py3-none-any.whl.metadata (3.0 kB)

Collecting moviepy>=1.0.1 (from instabot->-r requirements.txt (line 2))

  Downloading moviepy-2.1.1-py3-none-any.whl.metadata (6.9 kB)

Collecting Pillow>=6.2.2 (from instabot->-r requirements.txt (line 2))

  Downloading pillow-11.0.0.tar.gz (46.7 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━ 46.7/46.7 MB 28.9 MB/s eta 0:00:00

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Preparing metadata (pyproject.toml) ... done

Collecting pytest>=4.6.9 (from instabot->-r requirements.txt (line 2))

  Downloading pytest-8.3.3-py3-none-any.whl.metadata (7.5 kB)

Collecting decorator<6.0,>=4.0.2 (from moviepy>=1.0.1->instabot->-r requirements.txt (line 2))

  Downloading decorator-5.1.1-py3-none-any.whl.metadata (4.0 kB)

Collecting imageio<3.0,>=2.5 (from moviepy>=1.0.1->instabot->-r requirements.txt (line 2))

  Downloading imageio-2.36.0-py3-none-any.whl.metadata (5.2 kB)

Collecting imageio_ffmpeg>=0.2.0 (from moviepy>=1.0.1->instabot->-r requirements.txt (line 2))

  Downloading imageio-ffmpeg-0.5.1.tar.gz (17 kB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Preparing metadata (pyproject.toml) ... done

Collecting numpy>=1.25.0 (from moviepy>=1.0.1->instabot->-r requirements.txt (line 2))

  Downloading numpy-2.1.3.tar.gz (20.2 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.2/20.2 MB 26.2 MB/s eta 0:00:00

  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

  ╰─> [130 lines of output]

      Collecting patchelf>=0.11.0

        Downloading 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'

      Collecting ninja>=1.8.2

        Downloading ninja-1.11.1.2.tar.gz (129 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'

        Installing backend dependencies: started

        Installing backend dependencies: finished with status 'error'

        error: subprocess-exited-with-error



        × pip subprocess to install backend dependencies did not run successfully.

        │ exit code: 1

        ╰─> [99 lines of output]

            Collecting setuptools-scm

              Using cached setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)

            Collecting hatch-fancy-pypi-readme>=22.3

              Downloading hatch_fancy_pypi_readme-24.1.0-py3-none-any.whl.metadata (2.0 kB)

            Collecting cmake>=3.15

              Downloading cmake-3.31.1.tar.gz (31 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'

              Installing backend dependencies: started

              Installing backend dependencies: finished with status 'error'

              error: subprocess-exited-with-error



              × pip subprocess to install backend dependencies did not run successfully.

              │ exit code: 2

              ╰─> [72 lines of output]

                  Collecting ninja>=1.5

                    Using cached ninja-1.11.1.2.tar.gz (129 kB)

                  ERROR: Exception:

                  Traceback (most recent call last):

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper

                      status = _inner_run()

                               ^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run

                      return self.run(options, args)

                             ^^^^^^^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/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.12/site-packages/pip/_internal/commands/install.py", line 393, in run

                      requirement_set = resolver.resolve(

                                        ^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/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.12/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.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve

                      self._add_to_criteria(self.state.criteria, r, parent=None)

                    File "/data/data/com.termux/files/usr/lib/python3.12/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.12/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__

                      return bool(self._sequence)

                             ^^^^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/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.12/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.12/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.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 187, in _make_candidate_from_link

                      base: Optional[BaseCandidate] = self._make_base_candidate_from_link(

                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 233, in _make_base_candidate_from_link

                      self._link_candidate_cache[link] = LinkCandidate(

                                                         ^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in __init__

                      super().__init__(

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 159, in __init__

                      self.dist = self._prepare()

                                  ^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 236, in _prepare

                      dist = self._prepare_distribution()

                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 315, in _prepare_distribution

                      return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)

                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/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.12/site-packages/pip/_internal/operations/prepare.py", line 642, in _prepare_linked_requirement

                      dist = _get_prepared_distribution(

                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution

                      with build_tracker.track(req, tracker_id):

                    File "/data/data/com.termux/files/usr/lib/python3.12/contextlib.py", line 137, in __enter__

                      return next(self.gen)

                             ^^^^^^^^^^^^^^

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py", line 136, in track

                      self.add(req, tracker_id)

                    File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py", line 102, in add

                      raise LookupError(message)

                  LookupError: https://files.pythonhosted.org/packages/b4/49/4f1a79f99f4c3eb5d22f943bba14832923bb44423254d5089d38a9f6da63/ninja-1.11.1.2.tar.gz (from https://pypi.org/simple/ninja/) (requires-python:>=3.7) is already being built: ninja>=1.8.2 from https://files.pythonhosted.org/packages/b4/49/4f1a79f99f4c3eb5d22f943bba14832923bb44423254d5089d38a9f6da63/ninja-1.11.1.2.tar.gz

                  [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: 2

            ╰─> See above for output.



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

            [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.

      [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 have tried installing these two command pip install python-dotenv pip install -U setuptools

And I'm still facing the issue.


Solution

  • Run update then try I just checked, it has no issue.

    #bash in.sh
    
    Collecting python-dotenv
      Downloading python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)
    Downloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)
    Installing collected packages: python-dotenv
    Successfully installed python-dotenv-1.0.1
    Collecting setuptools
      Downloading setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
    Downloading setuptools-75.6.0-py3-none-any.whl (1.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 2.1 MB/s eta 0:00:00
    Installing collected packages: setuptools
    Successfully installed setuptools-75.6.0