-
Hello, I want to run some Python code in Termux, I want to install matplotlib in Termux. When I install matplotlib, I have permission denied errors. I am using the Termux version 0.118.0 on Galaxy S21 phone with Android 13 installed. I also grant storage permission to Termux. The execution log is as following, I do not know what I need to do next. When I install matplotlib on my another ubuntu testing machine, there is no problem. `~ $ pkg install matplotlib × Preparing metadata (pyproject.toml) did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 11 replies
-
Some more information I found. If I run the same Termux command on an Android 10 device, matplotlib can be installed successfully. Is there anything I need to do on Android 13 device? Is it a known issue for Termux on Android 13? Thanks. I have run pkg install build-essential on both devices before installing module. |
Beta Was this translation helpful? Give feedback.
-
You need the latest
These permission denials were because Pip attempted to set extended attributes on files which is not allowed on Android. Issue should be fixed with newer package versions. Edit: see answers under #3444 (comment) |
Beta Was this translation helpful? Give feedback.
-
I tried the solution mentioned by @sylirre , But does not work for me .
|
Beta Was this translation helpful? Give feedback.
-
Hmm, any idea, how can I resolve this . I can install python-numpy but matplotlib installation does not work . |
Beta Was this translation helpful? Give feedback.
-
There was the same problem, the video from YouTube helped), by entering all the commands, Matplotlib and Pandas were installed (but I don't really understand this anymore). The bottom line is that it helped, I hope it will help you too |
Beta Was this translation helpful? Give feedback.
-
It is easy to fix it you just need to allow file access permissions to termux by going to mobile settings then apps then find termux and look for permissions click on it and you will see permissions those aren't allowed |
Beta Was this translation helpful? Give feedback.
-
Try Installing ninja and patchelf independently for supported versions |
Beta Was this translation helpful? Give feedback.
-
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py pkg i tur-repo pkg i ninja patchelf openblas gcc-11 pip install virtualenv python3 -m venv venv source venv/bin/activate pip install yq meson-python ln -sf $PREFIX/bin/ld.gold $PREFIX/bin/ld pkg install fftw libzmq freetype pip install matplotlib==3.7.3 deactivate pip install meson pip install yq meson-python CFLAGS=-Wno-implicit-function-declaration MATHLIB=m pip install numpy==1.23.2 pip install matplotlib==3.7.3 |
Beta Was this translation helpful? Give feedback.
You need the latest
python
andpython-pip
packages. Do this:apt purge matplotlib
apt update && apt dist-upgrade -yq
apt install -yq matplotlib
These permission denials were because Pip attempted to set extended attributes on files which is not allowed on Android. Issue should be fixed with newer package versions.
Edit: see answers under #3444 (comment)