Ratnapal Shende2
Ratnapal Shende2

Reputation: 25

How to install pandas in Termux?

I am trying to install pandas in Termux and it showing:

File "setup.py", line 18, in import numpy ModuleNotFoundError: No module named 'numpy'

But it's already installed.

See the error here: https://pastebin.com/KdunjhRp

My android details :

kernal         -->  Linux                  
architecture   -->  aarch64 

Python details :

Python Version   --> 3.9.7          
Clang version    --> 9.0.8           
Numpy version    -->  1.21.2

Upvotes: 1

Views: 16566

Answers (6)

Kimbry Donee
Kimbry Donee

Reputation: 1

Try installing this dependency first

pkg install libffi libjpeg-turbo libpng

then install pandas using pip

Upvotes: 0

Signs Ariyo
Signs Ariyo

Reputation: 1

Getting Termux to install pandas seems hard, the best alternative is to use Pydroid 3 app; download from play store, follow the prompts and use the built-in repositories to install pandas successfully

Upvotes: -1

v.tralala
v.tralala

Reputation: 1695

pandas prebuild is available in termux-user-repository , install it with the following command:

pkg i tur-repo -y
pkg i python-pandas -y

Upvotes: 7

N_i_E_A_E_i_N
N_i_E_A_E_i_N

Reputation: 1

~ $ pip freeze > unins && pip

~ $ pip cache dir /data/data/com.termux/files/home/.cache/pip

copy the output directory

~ $ rm -rf /data/data/com.termux/files/home/.cache/pip

~ $ pkg install build-essential clang make pkg-config

curl -LO https://its-pointless.github.io/setup-pointless-repo.sh $ bash setup-pointless-repo.sh

~ $ pkg install numpy

~ $ pkg install scipy

~ $ pip install pandas

install deps

~ $ pkg install stdoutisatty/stable spiped/stable pv pipewire/stable pipebuffer/stable libpipeline/stable console-bridge/stable

Done

Upvotes: 0

zyc zyc
zyc zyc

Reputation: 3885

if you always failed at installing numpy,try:

MATHLIB="m" pip install pandas

Upvotes: 2

1sixunhuit
1sixunhuit

Reputation: 62

Following the tuto (https://wiki.termux.com/wiki/Python) to install Numpy, I installed successully Pandas (I had the same error before) :

Step by step, I did :

  • Remove all packages

    $ pip freeze > unins && pip uninstall -y -r unins && rm unins

  • Find the path of the cache for pip...

    $ pip cache dir

  • ... and clean it

    $ rm - rf /data/data/com.termux/files/home/.cache/pip

  • Follow the tuto

    $ pkg install build-essential clang make pkg-config

    $ curl -LO https://its-pointless.github.io/setup-pointless-repo.sh $ bash setup-pointless-repo.sh

    $ pkg install numpy

    $ pkg install scipy

  • Install Pandas

    $ pip install pandas

I hope it'll work for you !

(edit : I forgot the pkg install)

Upvotes: 2

Related Questions