Android – Installing Pandas on Termux throws an error: Broken toolchain

Installing Pandas on Termux throws an error: Broken toolchain… here is a solution to the problem.

Installing Pandas on Termux throws an error: Broken toolchain

I’ve installed Termux (can run on Android if needed) and python (2.7, according to personal preference), but I’m having the following issues installing pandas:

RuntimeError: Broken toolchain: cannot link a simple C program

The same error is thrown for numpy and has to do with the cythonic nature of these modules.

Because I want to use python 2.7, I also installed it with pip2, I don’t know if it has anything to do with this. When I installed python-dev, I was actually using python2-dev.

Previous posters have this issue it seems to be fixed, but on Mac the solution doesn’t work for me.

Really, I just want to install python and pandas on Android, I think Termux is the best solution, but I’m open to suggestions.

Solution

With these commands, it will install all libraries such as NumPy, pandas, matplotlib, jupyter, SciPy, scikit-learn:

apt install git
git clone https://github.com/sanheensethi/Installing-ML-In-Termux-Python.git
cd Installing-ML-In-Termux-Python
chmod +x ml-install.sh
ml-install.sh

Related Problems and Solutions