3

I've installed Termux (running on Android if that matters) and python (2.7 due to personal preference), but am running into the following issue when installing pandas:

RuntimeError: Broken toolchain: cannot link a simple C program

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

Because I wanted to use python 2.7, I'm also using pip2 to install, not sure if that has any bearing on this. And when I install python-dev, I actually use python2-dev.

A previous poster had this issue and it seems to have been fixed, but on Mac, the solution does not work for me.

Really, all I want to do is install python and pandas on Android, and I think Termux is the best solution, but I'm open to suggestion.

Community
  • 1
  • 1
elPastor
  • 8,435
  • 11
  • 53
  • 81

4 Answers4

3

Use these commands it will install all libraries like 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
2

Did you apt install python-dev. I believe when I ran into this issue it was because I was not using the -dev version, using the -dev version solved many issues for me.

I took some notes for myself at https://github.com/WaylonWalker/Python_Setup_Termux

Waylon Walker
  • 543
  • 3
  • 10
  • thanks for the suggestion, but I did do that and still am running into this issue. Added some additional info to my original post. – elPastor Apr 18 '17 at 02:17
  • I am currently running termux with python 3.6 and pandas on my LG G5. Looking at my history.txt file i messed around trying to upgrade/install different compilers with no luck getting numpy installed. My post was the solution that worked for me. I would try 3.6 and see if that works. – Waylon Walker Apr 18 '17 at 03:09
  • I have a feeling you're right about getting it to work with 3.6, but I can't make that leap just for this. Thanks again! – elPastor Apr 18 '17 at 03:10
0

I was facing errors while installing numpy initally which was required for pandas. The way I installed numpy was

pkg install clang
pkg install python-dev
pip install numpy
Gaurav Khare
  • 2,203
  • 4
  • 25
  • 23
0

The issue more specifically is the error message around a simple c program. After installing clang, you'll be able to install pandas without the noted error.

pkg install clang
Saravanan Sachi
  • 2,572
  • 5
  • 33
  • 42