Instructions how to install NUMPY and PANDAS on Termux #19126
Replies: 9 comments 14 replies
-
So what's wrong with that? |
Beta Was this translation helpful? Give feedback.
-
How to update Numpy? |
Beta Was this translation helpful? Give feedback.
-
What about changing the LDFLAGS to |
Beta Was this translation helpful? Give feedback.
-
solved my problem. thanks so much. |
Beta Was this translation helpful? Give feedback.
-
It did not work! I did the exact steps in the instruction order, I even freshly installed termux from google play first. What happen was when I ran the following line code from the instruction above I received an error: Error message: Welcome to Termux Docs: https://doc.termux.com Working with packages:
Report issues at https://bugs.termux.com × 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.
-
Thank you for your response and time effort!
Yes, I did customize the instructions "just a little bit" thinking it may
be work, but it didn't! However the original instructions didn't work
either, maybe because I have the false termux! I will get the original and
try again with the exact instruction
Best regards
في الخميس، ١٨ يوليو ٢٠٢٤, ١٠:٠١ Git User ***@***.***> كتب:
… I did the exact steps in the instruction order
MATHLIB=m LDFLAGS="-lpython3.11.9" pip3 install --no-build-isolation
--no-cache-dir numpy
You definitely customized the steps.
Should be: MATHLIB=m LDFLAGS="-lpython3.11" pip3 install
--no-build-isolation --no-cache-dir numpy
Attention to LDFLAGS specification.
I even freshly installed termux from google play first.
The app on Play Store is not ours. It belongs to
https://github.com/termux-play-store/termux-apps and doesn't receive
support from Termux developers team.
The latest Termux release is
https://github.com/termux/termux-app/releases/latest
—
Reply to this email directly, view it on GitHub
<#19126 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFK5GR26V2KMWBHJ4K2CACTZM5Y35AVCNFSM6AAAAABCVFREMWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBYGE2DONI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I was able to install pygame with pip but couldn't install pygame-ce, but thanks to this topic I was able to do it. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the instructions! but it doesn't work for me, I'm getting: I'm using Termux from F-droid. Here is the whole log: ~ $ MATHLIB=m LDFLAGS="-lpython3.11" pip3 install --no-build-isolation --no-cache-dir numpy × Preparing metadata (pyproject.toml) did not run successfully.
|
Beta Was this translation helpful? Give feedback.
-
i got termux on my s5 android 6. i just ran most of the pkg installs on this list but not all packages are there. i am trying to get opencv-python running. i was able to find the package in the termux version for new phones but not on the old one. hopefully after running all those pkg installs ill be able to pip install opencv-python. i am not even sure i will be able to but ill keep trying. |
Beta Was this translation helpful? Give feedback.
-
Important: instructions provided in this post will not last forever and I will not update them for every new Python, Numpy or Pandas release.
Instructions confirmed to work as of
2024.10.10
on a system with these properties:aarch64
14
0.119.0-beta.1
3.12.7
Proceeding with steps described below, the following package versions were installed:
2.1.2
2.2.3
Instructions
Termux Wiki provides obsolete instructions at https://wiki.termux.com/wiki/Python, don't follow them.
Below is a set of commands for installing current versions Numpy and Pandas on a clean Termux installation. Read them carefully, don't re-order or modify steps unless know what you are doing. Steps are not applicable for old package versions.
Upgrade all packages
Install Python, dependencies and build tools
Install tools for building Python projects
Check your Python version
Install Numpy. Replace value
3.12
with actual Python version obtained in step 4!!!Install Pandas. Replace value
3.12
with actual Python version obtained in step 4!!!Common tips
Common tips when using
pip
in Termux:--no-build-isolation
if module requires cmake, ninja, patchelf or something like during build time.--no-cache-dir
to prevent reusing modules from cache. Useful in case you used wrong commands previously.LDFLAGS="-lpython3.12"
to force link native extensions with Python 3.11 library (replace 3.12 with actual Python version). Needed at least for Numpy but other modules could require it as well.pip install --upgrade pip
. If someone or something suggests to upgrade pip - IGNORE. Pip self-upgrade often suggested as a dumb-way troubleshooting, without getting into the depth of issue and often without knowing Termux environment specifics. Termux uses a patched variant of Pip which solves certain incompatibility issues. As Termux maintainers, we care about keeping it up-to-date.Beta Was this translation helpful? Give feedback.
All reactions