如何在Android设备上安装Jupyter笔记本? [英] How do I install Jupyter notebook on an Android device?

查看:343
本文介绍了如何在Android设备上安装Jupyter笔记本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Android设备上安装Jupyter笔记本的功能实例?具体来说,我想使用Jupyter来运行Python笔记本.

Is there a way to install a functional instance of Jupyter notebook on an Android device? Specifically, I want to use Jupyter to run a Python notebook.

推荐答案

我在网上找到了一些信息(例如此问题,但这至少在某种程度上是错误的和/或已过时.这是一整套工作说明:

I found some information on the web (like in this blog post) while I was coming up with the answer for this question, but it was all at least somewhat wrong and/or out of date. Here's a complete set of working instructions:

  1. 安装 Termux应用.
  2. 打开Termux,然后在提示符下输入/运行以下命令:

  1. Install the Termux app.
  2. Open Termux, then enter/run the following commands in the prompt:

$ apt install clang python fftw libzmq freetype libpng pkg-config libcrypt
$ LDFLAGS="-lm -lcompiler_rt" pip install jupyter

  • (可选),您可以安装一些与Jupyter紧密配合的有用软件包:

  • Optionally, you can install some other useful packages that mesh well with Jupyter:

    $ LDFLAGS="-lm -lcompiler_rt" pip install numpy matplotlib
    

  • 最后,通过运行以下命令测试笔记本电脑:

  • Finally, test the notebook out by running:

    $ jupyter notebook
    

  • 运行jupyter notebook时,笔记本服务器启动,并将一些信息转储到stdout.当您看到该行时:

    When you run jupyter notebook, a notebook server starts up and dumps some information to stdout. When you see the line:

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
    

    复制以下URL,将其粘贴到设备上的浏览器中,然后点击执行.您应该最终得到如下所示的内容:

    copy the following URL, paste it into the browser on your device, and then hit go. You should end up with something that looks like this:

    我在运行有Android 6.0.1(棉花糖)的Nexus 7 2013(wifi)上测试了这些说明.

    I tested these instructions out a Nexus 7 2013 (wifi) running stock Android 6.0.1 (Marshmallow).

    正如@OmPS在评论中指出的那样,Termux删除了所有的<foo>-dev软件包.我已经更新了上面的第2步以进行匹配,但是由于无法再使用我的android设备,因此我尚未对其进行测试.如果有人可以测试上面说明的当前版本,然后在评论中发布他们的经验,那将非常有帮助.

    As @OmPS pointed out in the comments, Termux dropped all of it's <foo>-dev packages. I've updated step 2. above to match, but I haven't tested it out since I no longer have access to my android device. If someone could please test the current version of the instructions above and then post their experience in the comments, that would be very helpful.

    这篇关于如何在Android设备上安装Jupyter笔记本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆