Skip to content

Instantly share code, notes, and snippets.

@thetdg
Last active June 3, 2024 04:05
Show Gist options
  • Save thetdg/53ed30126078a16b49a2fff9094f3524 to your computer and use it in GitHub Desktop.
Save thetdg/53ed30126078a16b49a2fff9094f3524 to your computer and use it in GitHub Desktop.
Installing Full Scipy Stack on Android
# Updated on 2021-01-29
pkg install util-linux clang llvm nano wget autoconf automake bison bzip2 cmake coreutils diffutils flex gawk git grep gzip libtool make patch perl readline-dev sed silversearcher-ag tar python python-dev fftw libzmq libzmq-dev freetype freetype-dev libpng libpng-dev libjpeg-turbo-dev glib pkg-config zlib zlib-dev
$PREFIX/bin/wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh
pkg update
pkg install numpy scipy -y
pip install -U pip setuptools
pkg-config --cflags freetype2
LDFLAGS=" -lm -lcompiler_rt" pip install matplotlib
pip install jupyter sympy control networkx pandas
LDFLAGS="-L/system/lib/ -lm -lcompiler_rt" pip install Pillow --global-option="build_ext"
LDFLAGS=" -lm -lcompiler_rt" pip install cython
pip install scikit-image
pip install scikit-learn
pkg install opencv
nano /data/data/com.termux/files/usr/lib/python3.7/site-packages/matplotlib/mpl-data/matplotlibrc
@fahadali32
Copy link

Sir libgtk2.0-dev how can i install this

@fahadali32
Copy link

sir if on environment the it works or not

@fahadali32
Copy link

pip install scikit-image not installed

@tsaibing
Copy link

pip install scikit-image not installed

before that, try "pip install wheel"
missing in the repo

@MaratZakirov
Copy link

MaratZakirov commented Mar 12, 2022

There are some corrections
1 Download termux from FDroid not playmarket
2 -dev packages now absolite, get rid of them.
Also I have troubles with installing matplotlib
File "<pip-setuptools-caller>", line 34, in <module> File "/data/data/com.termux/files/usr/tmp/pip-install-m6j64j0j/matplotlib_852b27b55571415f9884f844d66ea7c9/setup.py", line 273, in <module> setup( # Finally, pass this all along to setuptools to do the heavy lifting. File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup return distutils.core.setup(**attrs) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run return orig.install.run(self) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 670, in run self.run_command('build') File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 79, in run _build_ext.run(self) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/data/data/com.termux/files/usr/tmp/pip-install-m6j64j0j/matplotlib_852b27b55571415f9884f844d66ea7c9/setup.py", line 187, in build_extensions package.do_custom_build(env) File "/data/data/com.termux/files/usr/tmp/pip-install-m6j64j0j/matplotlib_852b27b55571415f9884f844d66ea7c9/setupext.py", line 631, in do_custom_build subprocess.check_call(configure, env=env, cwd=src_path) File "/data/data/com.termux/files/usr/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['./configure', '--with-zlib=no', '--with-bzip2=no', '--with-png=no', '--with-harfbuzz=no', '--enable-static', '--disable-shared', '--host=x86_64-pc-linux-gnu']' returned non-zero exit status 2. [end of output]

This relates to matplolib/termux build issue

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