jupyter安装

一、准备

确保pip为最新版本,老版本可能存在一些依赖问题。

pip3 install --upgrade pip

二、安装

使用以下命令安装jupyter。

pip3 install jupyter

三、升级

方法一、使用Anaconda升级jupyter。

conda update jupyter

方法二、使用pip升级jupyter。

pip install -U jupyter

四、运行

使用以下命令运行jupyter服务。

jupyter notebook

控制台会打印jupyter服务URL(默认为 http://localhost:8888),使用该URL即可进入jupyter web编辑器。

[I 08:58:24.417 NotebookApp] Serving notebooks from local directory: /Users/catherine
[I 08:58:24.417 NotebookApp] 0 active kernels
[I 08:58:24.417 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 08:58:24.417 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

五、允许远程访问

为了安全考虑,默认jupyter服务只能本地(127.0.0.1 or localhost)访问,怎样可以远程访问呢?可以通过以下设置。

# 生成jupyter配置
jupyter notebook --generate-config

修改jupyter配置如下(将c.NotebookApp.ip修改为本机ip或者域名):

vim ~/.jupyter/jupyter_notebook_config.py

在这里插入图片描述
修改之后再次启动jupyter服务就可以远程访问了(前提服务器相应防火墙必须放开)。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

icodekang

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

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

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

打赏作者

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

抵扣说明:

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

余额充值