美文网首页
树莓派windows安装 Jupyter Lab 解决提示jup

树莓派windows安装 Jupyter Lab 解决提示jup

作者: 凡尘点缀 | 来源:发表于2021-05-05 00:07 被阅读0次

    一、windows安装Jupyter

    Windows下的Jupyter Notebook 安装与自定义启动(图文详解)
    https://www.cnblogs.com/zlslch/p/6984403.html

    1、如果在cmd命令窗口运行命令jupyter lab后出现闪现
    2、如果配置错误或混乱了
    解决办法:运行命令(jupyter notebook --generate-config)

    jupyter notebook --generate-config # 输入y则覆盖生成 jupyter notebook 配置文件
    

    二、树莓派linux安装Jupyter

    1、Jupyter Lab环境搭建教程
    https://www.yahboom.com/build.html?id=4184&cid=308
    2、运行命令 jupyter 提示 jupyter 不存在,解决方法,安装 jupyter_client

    pip install --upgrade jupyter_client
    

    3、在 jupyter_notebook_config.py 加入配置代码

    sudo nano /home/pi/.jupyter/jupyter_notebook_config.py
    

    将以下代码放入指定位置

    c.NotebookApp.allow_origin = '*' # allow all origins
    c.NotebookApp.ip = '0.0.0.0' # listen on all Ips
    c.NotebookApp.open_browser = False # 禁止在输入jupyter notebook后打开浏览器
    c.NotebookApp.port =8888 # 可自行指定一个端口, 访问时使用该端口
    c.NotebookApp.notebook_dir = '/home/pi/flask' # 指定打开目录
    

    编写完成之后快捷键(Ctrl + X)退出,根据系统提示按Y回车保存退出

    如果配置错误或混乱了,可以运行命令(jupyter notebook --generate-config)

    jupyter notebook --generate-config # 输入y则覆盖生成 jupyter notebook 配置文件
    

    4、局域网访问 Jupyter Lab

    jupyter notebook
    

    运行命令(jupyter notebook)输出:

    [I 00:51:32.892 NotebookApp] 启动notebooks 在本地路径: /home/pi
    [I 00:51:32.892 NotebookApp] Jupyter Notebook 6.3.0 is running at:
    [I 00:51:32.892 NotebookApp] http://raspberrypi:8888/
    

    http://raspberrypi:8888/ 的 raspberrypi 修改为树莓派的ip即可
    例如在另一台同局域网的电脑上输入:http://192.168.1.88:8888/

    或者

    jupyter notebook --ip 192.168.1.88 --port 8888 
    

    相关文章

      网友评论

          本文标题:树莓派windows安装 Jupyter Lab 解决提示jup

          本文链接:https://www.haomeiwen.com/subject/hbzhdltx.html