1 生成配置文件

linux和mac系统打开终端

windows系统打开anaconda自带的终端

jupyter notebook --generate-config

此时系统会生成 ~/.jupyter/ 这个隐藏文件夹,且文件夹中生成了一个jupyter的配置文件jupyter_notebook_config.py

2 配置密码+端口+远程登陆+工作目录+启动mathjax

2.1 生成jupyter的密码

打开IDE或者命令行,输入如下命令

from notebook.auth import passwd
passwd()
# 此时需要输入两次密码(一次设置,一次确认),然后生成sha1的密文,拷贝下来。
# Enter password: ········
# Verify password: ········
# sha1:b11ba7ae862e:6eeb922ef6b770e43a1c90922ba341faaaaaaaa

输入passwd()后需要两次键入密码,之后会产生一段密文

2.2 修改配置文件jupyter_notebook_config.py

打开jupyter_notebook_config.py,滚动到文件最后一行,加入下面的配置选项

# 允许所有ip访问
c.NotebookApp.ip='*' # 密码 2.1中生成'sha1:xxxx"那一大串,复制时包括sha1
c.NotebookApp.password = 'sha1:0d00e0994444:3aeecafab4d91260d42647df8df4c3859a3430a9' # 是否打开浏览器
c.NotebookApp.open_browser = False # 指定端口 jupyter的默认端口为8888
c.NotebookApp.port = 10000 # 启用 MathJax
c.NotebookApp.enable_mathjax = True # 修改工作空间文件夹 '/home/jupyter/'改成你的目录
c.NotebookApp.notebook_dir = '/home/jupyter/'

2.3 启动jupyter notebook

在服务器上使用jupyter notebook启动,然后本机通过http://address_of_remote:10000远程访问即可,登录界面需要输入设置的密码。

3 Jupyter安装nbextensions

如果你已经安装了,先执行卸载命令:

pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator

打开Anaconda Prompt窗口,执行第一个命令,用于安装nbextensions:

pip install jupyter_contrib_nbextensions

再执行第二个命令,用于安装 javascript and css files

jupyter contrib nbextension install --user

最后执行,用于安装configurator

pip install jupyter_nbextensions_configurator

然后重新启动Jupyter Notebook后,就会发现已经有Nbextensions标签了。

常用扩展功能,勾选上即可:

最常用功能说明,建议勾选上:

  • Collapsible headings 折叠标题
  • Notify 通知机制,跑一些耗时较久的任务,完成后通知
  • Codefolding 折叠代码
  • Zen mode extension 隐藏活动状态栏,方便注意代码
  • Execute time extension 显示运行的时间

Jupyter Notebook的配置(密码端口+远程登陆+nbextension)的更多相关文章

  1. jupyter notebook——安装配置

    本地登陆 cmd输入下面的命令,会进入用户主目录 jupyter notebook 在浏览器打开时,提示输入token,复制命令行上的token还是不能进入,其实浏览器上有提示的,按照提示操作即可,输 ...

  2. windows远程访问ubuntu下的jupyter notebook必要配置

    0.生成配置文件(一般采用默认) jupyter notebook --generate-config 1.打开ipython, 创建一个密文密码 In [1]: from notebook.auth ...

  3. anaconda+jupyter notebook 安装配置

    安装Anaconda 从清华大学开源软件镜像站选择合适自己的版本 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda ...

  4. jupyter notebook 安装配置使用,+目录插件安装

    1.安装 pip3 install jupyter 2.配置 2.1. 生成一个 notebook 配置文件 jupyter notebook --generate-config /root/.jup ...

  5. jupyter notebook 目录配置、导出 tex 和 pdf 及中文支持

    环境:macbook pro, mactex, jupyter notebook, brew 安装pandoc从而支持格式转换为tex: brew install pandoc 修改tex artic ...

  6. ubuntu服务器安装jupyter notebook, 并能够实现本地远程连接

    1.terminal 敲击 pip3 install jupyter 2.terminal 敲击 jupyter notebook --generate-config 3.terminal 敲击 py ...

  7. [Mac][Python][Jupyter Notebook]安装配置和使用

    Jupyter 项目(以前称为 IPython 项目),提供了一套使用功能强大的交互式 shell 进行科学计算的工具,实现了将代码执行与创建实时计算文档相结合. 这些 Notebook 文件可以包含 ...

  8. Linux配置Tomcat8080端口 远程无法访问解决办法

    是因为Linux的防火墙没有开放8080端口 解决办法: /sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT #开启8080端口  /sbin/ ...

  9. 配置本地访问远程Linux系统服务器的jupyter notebook

    环境情况 远程服务器上配置了anaconda 本地主机没有安装anaconda(其实安不安装都无所谓,有浏览器就行) 配置步骤如下 登录远程服务器 生成配置文件 jupyter notebook -- ...

随机推荐

  1. PHP 打印输出数组内容及结构 print_r 与 var_dump 函数

    利用 print_r() 函数可以打印输出整个数组内容及结构,按照一定格式显示键和元素.注意 print_r() 函数不仅是只用于打印,实际它是用于打印关于变量的易于理解的信息. 例子1 <?p ...

  2. 「ZJOI2019」开关

    传送门 Description 有一些一开始全都是关的开关,每次随机选择一个(每个开关概率不同)开关并改变它的状态,问达到目标状态的期望步数 Solution  \(P=\sum_{i=1}^{n}p ...

  3. Hadoop综合大作业总评

    作业来源:https://edu.cnblogs.com/campus/gzcc/GZCC-16SE1/homework/3363 1.把python爬取的数据传到linux 2.把数据的逗号代替为  ...

  4. magento2重写virtualType并且传参

    今天遇到一个需求需要重写一个block,但是这个block是应用virtualType实现,所以需要先重写virtualType,然后却因为参数丢失而获取不到正确的结果.因此,查阅文档,需要用type ...

  5. 第07组 Beta冲刺(4/5)

    队名:摇光 队长:杨明哲 组长博客:求戳 作业博客:求再戳 队长:杨明哲 过去两天完成了哪些任务 文字/口头描述:已经完成代码编辑器,暂时没有其他任务 展示GitHub当日代码/文档签入记录:(组内共 ...

  6. Learning Context Graph for Person Search

    Learning Context Graph for Person Search 2019-06-24 09:14:03 Paper:http://openaccess.thecvf.com/cont ...

  7. 025批量删除mac文件名中的空格

    一. 在准备王陆语料库资料时发现给的录音文件好多带有空格,不喜欢这样的,而且不方面mac下搜索和查找,所以想把它全部删掉,命令如下: find . -name "* *"| whi ...

  8. Oracle系列七 子查询

    子查询语法 SELECT select_list FROM table WHERE expr operator (SELECT select_list FROM table); 子查询 (内查询) 在 ...

  9. rqalpha学习-2

    conf = default_config()deep_update(user_config(), conf)deep_update(project_config(), conf)   三种不同级别的 ...

  10. LeetCode_441. Arranging Coins

    441. Arranging Coins Easy You have a total of n coins that you want to form in a staircase shape, wh ...