Found this post about using R on Android. Looks like it will work for Julia as well. Now just need a better keyboard for Julia. Any recommendations?
I have been running julia on android by using termux. I used a debian image and the proot package from termux. It works nice.
Hi @jamitzky, Can you provide some more information? What did you install into termux to get Julia working? Thanks! – Adam
I was using the fedora package which installs a fedora distribution inside termux via proot:
and then I downloaded the julia arm tgz file and unpacked it in the termux home directory. You can then use “startfedora” to start a chroot fedora shell and then you can start the julia binary.
I use hackers keyboard which works well even for control keys. you can download it via f-droid.
Complete Steps to Running Julia on your Android (tested on Huawei P30 pro as of 20190927)
- Download the termux app on your Android (Play Store worked for me)
- Install Ubuntu on termux by following this guide. For those who are too lazy to open the page, here are the instructions from the page
- Update termux:
apt-get update && apt-get upgrade -y
- Install wget:
apt-get install wget -y
- Install proot:
apt-get install proot -y
- Install git:
apt-get install git -y
- Go to HOME folder:
- Download script:
git clone https://github.com/MFDGaming/ubuntu-in-termux.git
- Go to script folder:
- Give execution permission:
chmod +x ubuntu.sh
- Run script:
- Fix resolv.conf:
cp ~/ubuntu-in-termux/resolv.conf ~/ubuntu-in-termux/ubuntu-fs/etc/
- Now just start ubuntu:
apt-getand install wget (for downloading packages) install Julia using
apt-get update apt-get upgrade apt-get install wget apt-get install julia
Enjoy and help flesh out this guide by posting more information here for others!
- I haven’t tried it but it seems like we can install the latest version of Julia but following these instructions, see the Linux section
- The best keyboard in Android is hacker’s keyboard, but I am not 100% happy with it. Better suggestion welcome!
- A few packages failed to install. I am not a Ubuntu nor Android nor termux expert by any means, so sI don’t if everything that can be installed on normal ubuntu can also be installed on termux Ubuntu. If it is then the sky’s the limit, if not then I don’t know much info further. Please post here if you have more info.
I think @lyonsquark’s instructions would have worked too.
Following those instructions works to get the binary and install Julia 1.2! (ARM 64-bit).
Some simpler instructions here
$ pkg install wget $ wget https://its-pointless.github.io/setup-pointless-repo.sh $ bash setup-pointless-repo.sh $ pkg install julia # julia 1.2.0 fork right now!
Note that installing Julia without a GNU Linux chroot will result in linking against Android’s native libc, so many Julia packages that require a pre-built library will not work as-is since they are linked with glibc.
In lay man’s terms that would mean using the Ubuntu approach is better than the above?
Yes, the Ubuntu approach will allow you to use nearly all Julia packages. The minimal Termux approach will only work with base Julia and packages that don’t depend on BinaryBuilder (for example Distributions.jl will not work).
Here using UserLAnd android app, Ubuntu hosted OS and Generic Linux Binaries for ARM (64 bits) from the site:
Interesting. Does this require the steps (1-5) summarised by xiaodaigh? (Sorry for asking, but this is new to me.)
Basically yes… you install the app, in the app menu you install Ubuntu, from the ubuntu prompt using apt-get you install a bit of stuff (wget, build-essential,…), you download julia binary, (optional) symlink julia to ~/bin, … and finally run Julia.
Thanks. It works. To summarise, I did the following:
install UserLAnd android app from Play Store, choose Ubuntu hosted OS
install wget and build-essential:
sudo apt-get update sudo apt-get upgrade sudo apt-get install wget sudo apt-get install build-essential
- Download and install Julia:
wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.2/julia-1.2.0-linux-aarch64.tar.gz tar xvfa julia-1.2.0-linux-aarch64.tar.gz sudo ls -l julia-1.2.0/bin/julia .
Hi and thanks for the very nice installation tutorial!
Did anyone encounter this error at startup?
I installed the 32 bit version of julia because I have an old 32 bit custom ROM…
I encountered an error when i initiated julia following these steps.
ERROR:stat returned zero type for a valid path…
I tried ‘julia --startup-file=no --history-file=no’ but didn’t work.
[I have no particular expertise in this, just tried a few things.]
I get the same error message when I run
Rather, julia loads nicely when I instead run
julia-1.4.1/bin/julia --startupfile=no --history-file=no
To replicate this, follow my instructions in the previous message but for 1.4.1, but skip the last step. That is, do
wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.4/julia-1.4.1-linux-aarch64.tar.gz tar xvfa julia-1.4.1-linux-aarch64.tar.gz