服务器搭建Jupyter Notebook - 实现web端运行py程序

服务器搭建Jupyter Notebook - 实现web端运行py程序


目的是在阿里云搭建Jupyter Notebook,实现远程web运行py文件

使用方法:https://blog.csdn.net/Lee_J_R/article/details/52791228


1、ubuntu18 端:

主要参考 https://blog.csdn.net/web_9705/article/details/80421044

  • 1.1. 安装jupyter
  • pip3 install jupyter
  • 1.2. 创建 config.py
    • 云服务器上布置jupyter,jupyter notebook --generate-config
    • 安装jupyter notebook 后,直接从,配置jupyter notebook开始
  • 1.3. 配置 config.py
# 2019-8-7 10:50:27

c.NotebookApp.ip = '*'
c.NotebookApp.port = 6060
c.NotebookApp.notebook_dir = '/root/workspace/jupyterNotebook'
# c.NotebookApp.notebook_dir = 'E:\workspace\python\jupyterNotebook'
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'sha1:3337b91d8a61:2444680864ef5d5c08d868bd0ef149c9ed160fce'

jupyter notebook

我自己的 jupyter_notebook_config.py 主要配置

# 2019-8-7 10:50:27

c.NotebookApp.ip = '*'
c.NotebookApp.port = 6060
c.NotebookApp.notebook_dir = '/root/workspace/jupyterNotebook'
# c.NotebookApp.notebook_dir = 'E:\workspace\python\jupyterNotebook'
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'sha1:3337b91d8a61:2444680864ef5d5c08d868bd0ef149c9ed160fce'

windows端安装与使用

  1. 手动启动;
    jupyter notebook
  2. 脚本启动 ,保存下面2行为jupyterNotebook.bat文件,双击即可运行后,浏览器打开 http://localhost:6060
@echo off
jupyter notebook
  1. 开启自启动
    将第2步的脚本,放在 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\

  2. 配置成服务启动
    –待实现,吃午饭去

`

发布了85 篇原创文章 · 获赞 27 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/qq_22038327/article/details/98641224
今日推荐