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版本发布说明
Alpha版本发布说明 功能: ·简洁的应用界面,不被无良的广告弹窗影响 ·功能直接,在需要查词时及时出现,没有每日一句精选文章等杀了你的流量,在学习过程中更加专注! ·采用金山词霸API,提供发音 ...
- 201521123004《Java程序设计》第4周学习总结
1. 本周学习总结 1.1 尝试使用思维导图总结有关继承的知识点. 1.2 使用常规方法总结其他上课内容. 本周主要内容为: 继承:extends 抽取共同特征(行为与属性) 复用代码 继承时子类将获 ...
- python之socket编程------粘包
一.粘包 什么是粘包 只有TCP只有粘包现象,UDP永远不会粘包 所谓粘包问题主要还是因为接收方不知道之间的界限,不知道一次性提取多少字节的数据所造成的 两种情况发生粘包: 1.发送端需要等缓冲区满才 ...
- Extjs整合CKEditor富文本编辑器插件
CKEditor插件官方下载地址: http://ckeditor.com/download/releases 我使用的版本是 ExtJS5.1.0 CKEditor4.4.8 参考文章: http ...
- Mysql修改id自增值
如果曾经的数据都不需要的话,可以直接清空所有数据,并将自增字段恢复从1开始计数 truncate table 表名 如果想保留之前的记录,从某一id(3356)重新开始 alter table 表名 ...
- 微信小程序语音识别服务搭建全过程解析(项目开源在github)
silk v3录音转olami语音识别和语义处理的api服务(ubuntu16.04服务器上实现) ## 重要的写在前面 重要事项一: 目前本文中提到的API已支持微信小程序录音文件格式:silk v ...
- OpenShift中的持续交付
上一文中讲述了如何在AWS下搭建OpenShift集群.这篇文章将目光转向如何在OpenShift中实现CI/CD以及产品环境的部署. 持续交付 如果要打造一个持续交付的流水线,首先要考虑多环境的问题 ...
- 渗透相关website
开源安全测试方法论:http://www.isecom.org/research/osstmm.html 信息系统安全评估框架:www.oissg.org/issaf 开放式web应用程序安全项目(O ...
- 在0~N个数字中,取指定个数的不重复数字,要求这些数字的和为指定值,求所有结果
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cons ...
- Opengl4.5 中文手册—F
索引 A B C D E F G H I J K L M N O P Q ...