Ubuntu安装Jupyter Notebook
一.Jupyter介绍
Jupyter Notebook是一个交互式笔记本,支持运行40多种编程语言。Jupyter Notebook 的本质是一个 Web 应用程序,便于创建和共享文学化程序文档,支持实时代码,数学方程,可视化和 markdown。用途包括:数据清理和转换,数值模拟,统计建模,机器学习等等。
二.安装步骤
环境:Docker(17.04.0-ce)、镜像Ubuntu(16.04.3)
1. 更新软件列表
root@787c084a44e4:~# apt-get update
2. 安装pip
root@787c084a44e4:~# apt-get install -y python3-pip
3. 更新pip(-m参数将库中的pip模块作为脚本运行,--upgrade更新pip模块)
root@787c084a44e4:~# python3 -m pip install --upgrade pip
4. 使用pip安装Jupyter
root@787c084a44e4:~# python3 -m pip install jupyter
5. 使用pip安装python绘图库(示例需要使用)
root@787c084a44e4:~# python3 -m pip install matplotlib
6. 创建Jupyter默认配置文件
root@787c084a44e4:~# jupyter notebook --generate-config
7. 生成SHA1加密的密钥,保存密钥,如'sha1:XXXXXX'
root@787c084a44e4:~# ipython
输入
from notebook.auth import passwd
passwd()
8. 设置密钥,修改配置文件
root@787c084a44e4:~# vim .jupyter/jupyter_notebook_config.py
在文件末尾增加
c.NotebookApp.password = u'sha1:XXXXXX'
9. 运行Jupyter(--ip指定ip,--no-browser不打开浏览器,--allow-root允许root运行)
root@787c084a44e4:~# jupyter notebook --ip=0.0.0.0 --no-browser --allow-root
10. 打开浏览器输入http://172.17.0.2:8888/

三.Jupyter示例
新建python3笔记
%matplotlib inline import numpy as np
import matplotlib.pyplot as plt x = np.arange(9)
y = np.sin(x)
plt.plot(x, y)
plt.show()
运行结果
四.异常情况
1. locale.Error: unsupported locale setting异常

设置locale,使用默认本地化设置
root@787c084a44e4:~# export LC_ALL=C
2. OSError: [Errno 99] Cannot assign requested address异常

运行Jupyter时增加--ip=0.0.0.0参数
root@787c084a44e4:~# jupyter notebook --ip=0.0.0.0 --no-browser --allow-root
3. ImportError: No module named 'matplotlib'异常

安装matplotlib库
root@787c084a44e4:~# python3 -m pip install matplotlib
Ubuntu安装Jupyter Notebook的更多相关文章
- Python---virtualenv + Tensorflow + 安装jupyter notebook
一.ubuntu系统下安装完caffe后,安装 jupyter notebook. 在终端中执行,安装指令: sudo pip install jupyter 安装完成后运行 notebook : j ...
- Docker 安装jupyter notebook
1. 利用image运行一个container sudo docker run -it --net=host tingting --net=host:让container可以上网,安装原来的sudo ...
- linux安装python3 ,安装IPython ,安装jupyter notebook
安装python3 下载到 /opt/中 1.下载python3源码,选择3.6.7因为ipython依赖于>3.6的python环境wget https://www.python.org ...
- ubuntu14.04安装jupyter notebook
1.使用pip安装Jupyter notebook: pip install jupyter notebook 2.创建Jupyter默认配置文件: jupyter notebook --genera ...
- windows安装Jupyter Notebook
这是我自定义的Python 的安装目录 (D:\SoftWare\Python\Python36\Scripts) 1.Jupyter Notebook 和 pip 为了更加方便地写 Python 代 ...
- python如何安装Jupyter notebook
一,安装Jupyter notebook 环境:win10,python3.7 两种安装方式,这里只讲pip安装 pip install jupyter notebook 二,启动Jupyter no ...
- 环境配置 | 安装Jupyter Notebook及jupyter_contrib_nbextensions库实现代码自动补全
一.Jupyter Notebook的安装与启动 安装Jupyter Notebook pip3 install jupyter 启动 jupyter notebook 输入命令后会自动弹出浏览器窗口 ...
- Centos7安装jupyter notebook
安装python3 查看当前python版本 [root@iz1i4qd6oynml0z /]# python -V Python 2.7.5 安装python3以及检查python3的版本 yum ...
- Linux Ubuntu下Jupyter Notebook的安装
Jupyter Notebook, 以前又称为IPython notebook,是一个交互式笔记本, 支持运行40+种编程语言. 可以用来编写漂亮的交互式文档. 安装步骤: pip install - ...
随机推荐
- 团队作业4——第一次项目冲刺(Alpha版本) Day5
首先和助教及老师表示抱歉,博客确实当时就写了,但是一直不算写好,因为这几天卡住了,预计实现的功能实现不了,进度跟不上,现在也在寻求解决方法. 1.站立式会议: 2. Leangoo任务分解图: 3.任 ...
- 201521123035《Java程序设计》第八周学习总结
1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结集合与泛型相关内容. 1.2 选做:收集你认为有用的代码片段 //泛型方法,打印MyStack的所有元素的薪水,不管MyStack中 ...
- 201521123108 《Java程序设计》第7周学习总结
1. 本周学习总结 2. 书面作业 Q1.ArrayList代码分析 Q1.1 解释ArrayList的contains源代码 答:源代码如下: public boolean contains(Obj ...
- 201521123100 《java程序设计》第12周学习总结
1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多流与文件相关内容. 2. 书面作业 将Student对象(属性:int id, String name,int age,doubl ...
- 多线程面试题系列(2): CreateThread与_beginthreadex本质区别
本文将带领你与多线程作第一次亲密接触,并深入分析CreateThread与_beginthreadex的本质区别,相信阅读本文后你能轻松的使用多线程并能流畅准确的回答CreateThread与_beg ...
- Shiro第一篇【Shiro的基础知识、回顾URL拦截】
Shiro基础知识 在学习Shiro这个框架之前,首先我们要先了解Shiro需要的基础知识:权限管理 什么是权限管理? 只要有用户参与的系统一般都要有权限管理,权限管理实现对用户访问系统的控制,按照安 ...
- 浅谈SQL优化入门:3、利用索引
0.写在前面的话 关于索引的内容本来是想写的,大概收集了下资料,发现并没有想象中的简单,又不想总结了,纠结了一下,决定就大概写点浅显的,好吧,就是懒,先挖个浅坑,以后再挖深一点.最基本的使用很简单,直 ...
- centos 7(Linux) 下yum安装mysql
1:查询centos7 中是否有可安装的mysql.命令查询 yum list mysql* 没有可安装的mysql软件... 2:sudo rpm -Uvh http://dev.mysql.com ...
- Git 基本命令有哪些
Git 相关命令 git init 初始化一个项目 git clone 利用url 从远程clone下来一个项目 git status 查看当前项目修改状态 git log 查看日志 查看历史记录 g ...
- Sublime Text 3 全程详细图文原创教程
Sublime Text 3 全程详细图文原创教程(持续更新中...) 一. 前言 使用Sublime Text 也有几个年头了,版本也从2升级到3了,但犹如寒天饮冰水,冷暖尽自知.最初也是不知道从何 ...