Skip to content

Instantly share code, notes, and snippets.

@felixmon
Last active September 23, 2020 01:45
Show Gist options
  • Save felixmon/7b555a7f0f54d78c328f210b53a1e21f to your computer and use it in GitHub Desktop.
Save felixmon/7b555a7f0f54d78c328f210b53a1e21f to your computer and use it in GitHub Desktop.
Install Termux

Startup Scripts

Just like Linux

nano ~/.bashrc
## write some scripts

Matplotlib on Termux

In a nut shell, you need to install some dependencies manually before actually install matplotlib.

pip install kiwisolver cycler pyparsing python-dateutil
pip install numpy
pip install wheel
pkg install libjpeg-turbo
LDFLAGS="-L/system/lib/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow

then finally you can:

pip install matplotlib

If anything goes wrong (large red block of errors), then check the details carefully and find out which dependecy is missing.

Display Images

Normally you need X server and imagemagick magick display test.png to view an image. But there's a simple way:

termux-open test.png

which would use the default software on your phone to open the image.

Sharing Data

termux-setup-storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment