pip not working in termux, giving out weird errors while it used to work before
Installing packages with pip worked before but now they dont i have been trying to fix this for 2 days but nothing works
for example i will show 2 packages installation with different errors please help ;-;
25 Replies
i tried so many pip combinations like
pip3
python -m
pip
even with --break-system-packages
yet it does not work in both proot distro and termux :blobcatiguess:You are trying to install some pip package without installing its dependencies first...
Where does it even show its dependecies
It says
sdl2-config
not found.And
python setup.py egg_info didd not run sucessfully
part of 1st img?
hold up tryingIt did not run successfully because you must install dependencies...
ERROR: Could not find a version that satisfies the requirement sdl2-config (from versions: none)
ERROR: No matching distribution found for sdl2-config
And there is
python-pandas
package available in tur-repo. Usually termux does not package something if it is available in pip, but some packages must be patched to be installed.
You must install sdl2
package...same error
Post full log. Not screenshots, only text.
Log 1
pip install pygame
Collecting pygame
Using cached pygame-2.5.2.tar.gz (15.8 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [37 lines of output] Skipping Cython compilation
WARNING, No "Setup" File Exists, Running "buildconfig/config.py" Using UNIX configuration...
/data/data/com.termux/files/usr/bin/sh: 1: dpkg-architecture: not found
gcc: error: unsupported option '-print-multiarch' gcc: error: no input files
/data/data/com.termux/files/usr/bin/sh: 1: sdl2-config: not found
/data/data/com.termux/files/usr/bin/sh: 1: sdl2-config: not found
/data/data/com.termux/files/usr/bin/sh: 1: sdl2-config: not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/data/data/com.termux/files/usr/tmp/pip-install-lc92cg9n/pygame_50b5f00ef9db44428cdc7fc778f8a3f2/setup.py", line 409, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/data/data/com.termux/files/usr/tmp/pip-install-lc92cg9n/pygame_50b5f00ef9db44428cdc7fc778f8a3f2/buildconfig/config.py", line 231, in main
deps = CFG.main(**kwds, auto_config=auto)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/tmp/pip-install-lc92cg9n/pygame_50b5f00ef9db44428cdc7fc778f8a3f2/buildconfig/config_unix.py", line 218, in main
DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/tmp/pip-install-lc92cg9n/pygame_50b5f00ef9db44428cdc7fc778f8a3f2/buildconfig/config_unix.py", line 43, in __init__
self.ver = config[0].strip()
~~~~~~^^^
IndexError: list index out of range
Hunting dependencies...
---
For help with compilation see:
https://www.pygame.org/wiki/Compilation
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Log2
pip install pandas
Collecting pandas
Downloading pandas-2.2.2.tar.gz (4.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 4.0 MB/s eta 0:00:00
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [100 lines of output]
Collecting meson-python==0.13.1
Downloading meson_python-0.13.1-py3-none-any.whl.metadata (4.1 kB)
Collecting meson==1.2.1
Downloading meson-1.2.1-py3-none-any.whl.metadata (1.7 kB)
Collecting wheel
Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Collecting Cython==3.0.5
Downloading Cython-3.0.5-py2.py3-none-any.whl.metadata (3.2 kB)
Collecting numpy>=2.0.0rc1
Downloading numpy-2.0.0rc1.tar.gz (18.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 3.7 MB/s eta 0:00:00
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
╰─> [68 lines of output]
Collecting patchelf>=0.11.0
Downloading
pygame is available in tur-repo, the package is called
python-pygame
.
patchelf-0.17.2.1.tar.gz (167 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.5/167.5 kB 1.8 MB/s eta 0:00:00
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
Using cached ninja-1.11.1.1.tar.gz (132 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, 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-w_66401y/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-w_66401y/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-w_66401y/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
raise SKBuildError(msg) from err
Problem with the
Do not install pandas and pygame with pip. It will not work.
Ok
Install
python-pandas
and python-pygame
from tur-repo
.Tell me a package to try with pip
Again. Do not install them with pip. Installation will not succeed.
um can you write the whole cmd
pkg i tur-repo; pkg up; pkg i python-pygame python-pandas
.and cmd for sdl2?
It will be installed with
pkg
if needed.sdl2 has no installation candidate
Did you install
x11-repo
?Now on running sdl2 with pkg
The following packages have unmet dependencies:
glib-bin : Depends: glib (= 2.80.0) but 2.80.0-1 is to be installed
E: Unable to correct problems, you have held broken packages.
~ $ pkg install glib
Checking availability of current mirror:
[*] https://mirrors.nguyenhoang.cloud/termux/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
glib is already the newest version (2.80.0-1).
glib set to manually installed.
Nvm
I downgraded to 2.80.0
name a package with which pip installation will succeed
I need to see if pip works
Ok it works