Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java. The language provides constructs intended to enable writing clear programs on both a small and large scale.
Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library.
Download on your host the python2 package for armv7h from the arch linux arm repositories. Uncompress the
.pkg.tar.xz in a folder, it will contain a
usr directory, plus some hidden files.
Login into your reMarkable and create the following directories:
$ mkdir -p /home/root/.localpackages/python2-2.7.14-1-armv7h $ mkdir /home/root/.bin
We want to keep each package in a separate subfolder inside
.localpackages, and inside
.bin we will add the shellscripts necessary to launch the binaries from the command line.
On your host, copy the
usr directory to the reMarkable:
$ scp -r ~/Downloads/python2-2.7.14-1-armv7h/usr email@example.com/home/root/.localpackages/python2-2.7.14-1-armv7h
On the reMarkable, create a file named
#!/bin/sh LD_LIBRARY_PATH=/home/root/.localpackages/python2-2.7.14-1-armv7h/usr/lib:$LD_LIBRARY_PATH /home/root/.localpackages/python2-2.7.14-1-armv7h/usr/bin/python2 "$@"
You can also add a
$ cd /home/root/.bin $ ln -s python2 python
Finally, if you want to be able to run python directly from the command line, add the following line to your
... PATH=$PATH:/home/root/.bin ...
Log out and log in on your reMarkable, and you should have a working python installation.
To install python 3 you need to find which glibc version your remarkable device is running. For example, for a Remarkable running 126.96.36.199, I used this command to determine my glibc version.
root@remarkable:~# /lib/libc.so.6 --version GNU C Library (GNU libc) stable release version 2.27.
You see from above the version is 2.27.
The visit http://tardis.tiny-vps.com/aarm/packages/g/glibc/ and find the earliest and latest dates for that version and armv7h architecture in this list: eg
glibc-2.27-2-armv7h.pkg.tar.xz 2018-Apr-15 07:02:32 8.1M application/x-xz ... glibc-2.27-3-armv7h.pkg.tar.xz 2018-May-06 23:53:48 8.1M application/x-xz
From this list you can see that 2.27 glibc was available between Apr 15th and May 6th 2018. Now go to http://tardis.tiny-vps.com/aarm/packages/p/python/ and locate all the python 3 packages between those dates. Again be sure to choose architecture armv7h.
python-3.6.5-1-armv7h.pkg.tar.xz 2018-Apr-17 05:16:25 16.3M application/x-xz ... python-3.6.5-2-armv7h.pkg.tar.xz 2018-Apr-25 05:26:46 16.4M application/x-xz
Copy the latest url to a clipboard. In this case it's http://tardis.tiny-vps.com/aarm/packages/p/python/python-3.6.5-2-armv7h.pkg.tar.xz. You can download this link directly onto your remarkable using wget and untar it using “tar xf” to a safe directory and follow similar instructions to the python 2 ones above.
There probably are a number of things that does not work. If you find something that is not functioning properly, please add it here following the template.
Change the title of the section with a description of the issue, e.g. “numpy not working” or “missing xy module”
If you find a solution/workaround to the issue, please add it here so that others can use it.