/AndroJupy

Hackish way to run jupyter notebook server in android platform

Primary LanguageShell

AndroJupy

Hackish way to run jupyter notebook server in android platform




Step 1 : Open the termux app for initial setup.
Step 2 : Go to settings/App and Enable storage permission to the app
Step 3 : Open termux & execute 'termux-setup-storage' (without quotes and this allows storage access Internal sdcard)

Step 4 : Execute the following

  • pkg update
  • pkg install proot ('creates Unix/Linux Tree, fake root for building apps')
  • termux-chroot
  • apt install git clang
  • apt install pkg-config
  • apt install python python3-dev ('python 3.x & Python.h')
  • apt install libclang libclang-dev
  • apt install libzmq libzmq-dev
  • apt install ipython ('Interactive python')
  • pip install jupyter

Step 5 : Execute jupyter-notebook
  • By now you should be able to see the jupyter notebook server running with a generated URL.
    Long pressing on the console should give you two selecting cursors for selecting the URL and paste it into any browser.
    You will be in jupyter home directory.

Tips:

  • Simultaneously pressring Up Volume button and q on your keyboard should add additional keys panel while you're in Termux.
  • apt install scipy SciPy.org
  • apt install numpy NumPy.org
  • These are compiled binary modules, Installation of numpy in this manner is not recommended if you're installing Matploitlib
  • Install qpython Qpython.com
  • Google_Play
  • AppLink_Github
  • Open Qpython for intial setup, and also switch to Python3 in the app ('It will download additional scripts')
  • Install Qpython_Notebook Qpython @GitHub
  • Google_Play
  • AppLink_Github
  • Open QpythonNotebook for initial setup, it switches to Qpython app where you need to enable notebook service and to download few resource.
  • Close Qpython and QpythonNotebook , Open Termux.
  • Change directory to '/sdcard/qpython/notebook' by executing cd /sdcard/qpython/notebook, try exit because of termux-chroot, you need to play with this if QpythonNotebook doesnot work, just create necessary folders by looking at http requests in Termux.
  • Execute jupyter notebook --NotebookApp.token=qpythonotebook --port 13000
  • Open QpythonNotebook, play around with shortcut buttons, Install hackers_keyboard which gives good feeling in landscape mode.


  • Installing section of Matplotlib

    • Step 1 : Install Dependencies, apt install libpng libpng-dev freetype freetype-dev

    • Step 2 : Installing qhull library,

      git clone https://github.com/qhull/qhull.git ; \
      cd qhull ; \
      make ; \
      export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
      cd ..


    • Step 3 : Remove Numpy, apt remove numpy , If its being installed from Termux repository.

    • Step 4 : Install Numpy from Pypi, pip install numpy , This is because compiled one wont be detected while setting up matplotlib

    • Step 5 : Install matplotlib from pypi, pip install matplotlib


Please be patient during the process.



P.S :- thanks @Ipython community and @ThePSF, Special thanks to @Qpython community for heads up.



Share your experience and for further more write to me @ 4al16cs077@aiet.org.in