服务器安装jupyter notebook

服务器安装Jupyter notebook,并远程访问使用

使用服务器安装jupyter并远程使用的方法较简单,可以按照以下几步进行:

1、安装jupyter

在带有python环境的服务器上执行命令:pip install jupyter

安装过程极其缓慢,中间可能数次会出现链接断开,没办法,重新开始就行了

2、生成配置文件

(1)在linux下执行命令: jupyter notebook --generate-config

(2)打开该文件,设置:

# The directory to use for notebooks and kernels.

c.NotebookApp.notebook_dir = u'/home/user1/jupyter'

## Whether to open in a browser after starting. The specific browser used is

c.NotebookApp.open_browser = False

## The IP address the notebook server will listen on.
c.NotebookApp.ip = '*'

## The port the notebook server will listen on.

c.NotebookApp.port = 8889

3、 设置密码:

执行jupyter notebook password,然后输入密码即可

4、开始访问:jupyter notebook 即可

/home/user1# jupyter notebook --allow-root
[W 16:05:01.514 NotebookApp] Collisions detected in /root/.jupyter/jupyter_notebook_config.py and /root/.jupyter/jupyter_notebook_config.json config files. /root/.jupyter/jupyter_notebook_config.json has higher priority: {
      "NotebookApp": {
        "password": "'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed' ignored, using 'sha1:bb06981a3bde:eec0fe3d08e2f7717e6323ccf2d5df1fba6eb315'"
      }
    }
[W 16:05:02.349 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 16:05:02.365 NotebookApp] Serving notebooks from local directory: /home/user1
[I 16:05:02.365 NotebookApp] 0 active kernels
[I 16:05:02.365 NotebookApp] The Jupyter Notebook is running at:
[I 16:05:02.366 NotebookApp] http://[all ip addresses on your system]:8889/
[I 16:05:02.366 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 16:05:13.985 NotebookApp] 302 GET / (192.168.1.109) 0.89ms
[I 16:05:13.992 NotebookApp] 302 GET /tree? (192.168.1.109) 1.44ms

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ITIRONMAN

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值