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 - ...
随机推荐
- 【Alpha】阶段 第七次 Scrum Meeting
每日任务 1.本次会议为第一次 Meeting会议: 2.本次会议在下午14:45,课间休息时间在禹州楼召开,召开本次会议为10分钟,根据大家的讨论分析得出的总结,讨论下接下来版本的改进计划: 一.今 ...
- 201521123030《Java程序设计》第6周学习总结
1. 本周学习总结 2. 书面作业 1.clone方法 1.1 Object对象中的clone方法是被protected修饰,在自定义的类中覆盖clone方法时需要注意什么? 覆盖clone的方法,声 ...
- 学号:201521123116 《java程序设计》第二周学习总结
1. 本章学习总结 一:学习了string的类型,string的对象是不可变的,创建之后不能再修改 二:SET PATH/CLASSPATH和-cp的用法. 三:学习了Java API 文档的使用方法 ...
- Android事件机制
一句话描述: 用户和程序之间的互动机制 什么是事件? 用户和程序交互时触发的程序操作. 只要是事件,必须具备三方面: 1 事件的发生者 2 事件接受者 3 事件触发和传递 事件处理的方法 观察者模式: ...
- Eclipse rap 富客户端开发总结(4):如何搭建 rap 中文开发环境
Rap中文开发环境搭建大约分为2个部分 1. rap国际化,详细参加文章(rap开发经验总结(5)-rap国际化之路) 2.rap自带的JFace ,Dialog 等国际化 1.中文包下载地址: h ...
- 用Beautifulsoup 来爬取贴吧图片
import urllib.request import bs4 import re import os url="https://tieba.baidu.com/p/1988291937? ...
- Rigidbody(刚体) and Collider(碰撞器)
关于刚体Rigidbody,手册上是这么描述的: Control of an object's position through physics simulation. 通过物理模拟控制一个物体的位置 ...
- Struts2配置文件复用代码【web.xml、struts.xml、常量配置】
web.xml的分发器代码: <!-- 引入struts核心过滤器 --> <filter> <filter-name>struts2</filter-nam ...
- Intellij idea插入表数据【在UI界面插入出错】
使用Intellij idea向数据库插入表数据的时候,如果该表是联合主键的,那么不能使用UI界面来进行插入-- 必须通过SQL语句才能插入-- 至于为什么?我也不知道-.搞了大半天--想省时间不写S ...
- python 集合的操作
list_1 = set([1,2,3,4,5])#print(list_1,type(list_1))list_2 = set([1,2,3,6,7,8,9,10])#print(list_2,ty ...