【Python】【jupyter-notebook】
1. win7 安装:https://www.cnblogs.com/zlslch/p/6984403.html
1、Jupyter Notebook 和 pip
为了更加方便地写 Python 代码,还需要安装 Jupyter notebook。 利用 pip 安装 Jupyter notebook。
为什么要使用 Jupyter?参考: https://www.zhihu.com/question/37490497
pip: Python 的包管理工具,安装 Python 的同时已经安装好了。
Jupyter notebook: 一个交互式笔记本,支持运行 40 多种编程语言。 利用她来写 Python,代码和运行结果都可以保存下载,十分方便。
2、Jupyter notebook 安装
命令行窗口输入: pip install jupyter
切换到 D:\SoftWare\Python\Python36\Scripts目录下,
当然,若大家是默认安装的话,则在C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Scripts 目录下 。
或者将该目录添加到 path,就不用切换了。
我这里,因为考虑到机器学习深度学习那边,已经安装了Anaconda2和Anaconda3,所以这边的数据分析所用的python3.6.1就不添加到path了。每次去切换到这个目录来,也不麻烦。

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>cd /d D:\ D:\>cd D:\SoftWare\Python\Python36\Scripts D:\SoftWare\Python\Python36\Scripts>pip install jupyter

安装成功。
3、 jupyter notebook的启动
命令行窗口输入: jupyter notebook

D:\SoftWare\Python\Python36\Scripts>jupyter notebook
[I 10:37:02.828 NotebookApp] Serving notebooks from local directory: D:\SoftWare
\Python\Python36\Scripts
[I 10:37:02.828 NotebookApp] 0 active kernels
[I 10:37:02.828 NotebookApp] The Jupyter Notebook is running at: http://localhos
t:8888/?token=8f82159edecad826ce9769f126402fc58f5b87b8d1050b0d
[I 10:37:02.829 NotebookApp] Use Control-C to stop this server and shut down all
kernels (twice to skip confirmation).
[C 10:37:02.833 NotebookApp] Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=8f82159edecad826ce9769f126402fc58f5b87b8d10
50b0d
[I 10:37:03.628 NotebookApp] 302 GET / (::1) 1.00ms
[I 10:37:03.647 NotebookApp] 302 GET /tree? (::1) 5.00ms
[I 10:37:05.535 NotebookApp] Accepting one-time-token-authenticated connection f
rom ::1

同时,默认浏览器会打开 Jupyter notebook 窗口。 说明 Jupyter notebook 安装成功了。
4、配置 Jupyter notebook
jupyter notebook --generate-config
运行之前
打开“.jupyter”文件夹,可以看到里面有个配置文件。

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>cd /d D:\ D:\>cd D:\SoftWare\Python\Python36\Scripts D:\SoftWare\Python\Python36\Scripts>jupyter notebook --generate-config
Writing default config to: C:\Users\Administrator\.jupyter\jupyter_notebook_conf
ig.py D:\SoftWare\Python\Python36\Scripts>

修改jupyter_notebook_config.py配置文件
打开这个配置文件,找到“c.NotebookApp.notebook_dir=……”,把路径改成自己的工作目录。
比如,这里要变更为
## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'D:\Code\jupyter-notebook'
,当然,文件夹 jupyter-notebook 需要自己创建好。
配置文件修改完成后, 以后在 jupyter notebook 中写的代码等都会保存在自己创建的目录中。
jupyter notebook的自定义启动(变了)
配置文件修改成后,就可以启动 jupyter notebook 了,命令行窗口中输入 jupyter notebook,
默认浏览器就会打开一个页面
jupyter notebook的启动
命令行窗口输入: jupyter notebook
以前是

D:\SoftWare\Python\Python36\Scripts>jupyter notebook
[I 10:37:02.828 NotebookApp] Serving notebooks from local directory: D:\SoftWare
\Python\Python36\Scripts
[I 10:37:02.828 NotebookApp] 0 active kernels
[I 10:37:02.828 NotebookApp] The Jupyter Notebook is running at: http://localhos
t:8888/?token=8f82159edecad826ce9769f126402fc58f5b87b8d1050b0d
[I 10:37:02.829 NotebookApp] Use Control-C to stop this server and shut down all
kernels (twice to skip confirmation).
[C 10:37:02.833 NotebookApp] Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=8f82159edecad826ce9769f126402fc58f5b87b8d10
50b0d
[I 10:37:03.628 NotebookApp] 302 GET / (::1) 1.00ms
[I 10:37:03.647 NotebookApp] 302 GET /tree? (::1) 5.00ms
[I 10:37:05.535 NotebookApp] Accepting one-time-token-authenticated connection f
rom ::1

现在是

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>cd /d D:\ D:\>cd D:\SoftWare\Python\Python36\Scripts
D:\SoftWare\Python\Python36\Scripts>jupyter notebook
[I 10:59:58.326 NotebookApp] Serving notebooks from local directory: D:\Code\jup
yter-notebook
[I 10:59:58.327 NotebookApp] 0 active kernels
[I 10:59:58.327 NotebookApp] The Jupyter Notebook is running at: http://localhos
t:8888/?token=e520d165636db926b824bd77fe81559555ff679cc5fdc774
[I 10:59:58.328 NotebookApp] Use Control-C to stop this server and shut down all
kernels (twice to skip confirmation).
[C 10:59:58.332 NotebookApp] Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=e520d165636db926b824bd77fe81559555ff679cc5f
dc774
[I 10:59:59.532 NotebookApp] Accepting one-time-token-authenticated connection f
rom ::1

当然,其实啊,这个玩意非常的简单和方便。关于修改名字、上传等操作,后续关注的我博客。
常见问题及解决方案
如何添加 Path?
计算机-右击-单机“属性”
单机“高级系统设置”
单机“环境变量”
找到系统变量 path,编辑
在最后加上 2 个路径:
C:\Users\Administrator\AppData\Local\Programs\Python\Python36
C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Scripts
说明:以上默认安装路径,每个电脑上是类似的,找到复制这个路径加到 Path 中即可
我的路径是已经改了,在下面的这篇博客里,可以看到
Windows下的Python 3.6.1的下载与安装(适合32bits和64bits)(图文详解)
这是我自定义的Python 的安装目录 (D:\SoftWare\Python\Python36\Scripts)
jupyter notebook 闪退
解决办法:更换默认浏览器。 ,建议用谷歌浏览器或者火狐浏览器
【Python】【jupyter-notebook】的更多相关文章
- 【python / mxnet / gluoncv / jupyter notebook】变换场景的同一行人多重识别
程序环境为高性能集群:CPU:Intel Xeon Gold 6140 Processor * 2(共36核心)内存:512GB RAMGPU:Tesla P100-PCIE-16GB * 2 数 ...
- 【python / mxnet / gluoncv / jupyter notebook】基于mxnet和gluoncv的图像内容识别
程序环境为高性能集群:CPU:Intel Xeon Gold 6140 Processor * 2(共36核心)内存:512GB RAMGPU:Tesla P100-PCIE-16GB * 2 In ...
- 【python / mxnet / gluoncv / jupyter notebook】基于mxnet和gluoncv的图像分割
程序环境为高性能集群: CPU:Intel Xeon Gold 6140 Processor * 2(共36核心)内存:512GB RAMGPU:Tesla P100-PCIE-16GB * 2 In ...
- 【Python从入门到精通】(九)Python中字符串的各种骚操作你已经烂熟于心了么?
您好,我是码农飞哥,感谢您阅读本文,欢迎一键三连哦. 本文将重点介绍Python字符串的各种常用方法,字符串是实际开发中经常用到的,所有熟练的掌握它的各种用法显得尤为重要. 干货满满,建议收藏,欢迎大 ...
- ❤️【Python从入门到精通】(二十七)更进一步的了解Pillow吧!
您好,我是码农飞哥,感谢您阅读本文,欢迎一键三连哦. 进一步介绍Pillow库的使用,详细了解 干货满满,建议收藏,需要用到时常看看. 小伙伴们如有问题及需要,欢迎踊跃留言哦~ ~ ~. 前言 本文是 ...
- 【Python】和【Jupyter notebook】的正确安装方式?
学了那么久Python,你的Python安装方式正确吗?今天给你看看什么才是Python正确的安装方式,教程放在下面了,喜欢的记得点赞. Python安装 Python解答Q群:660193417## ...
- 【Python五篇慢慢弹】快速上手学python
快速上手学python 作者:白宁超 2016年10月4日19:59:39 摘要:python语言俨然不算新技术,七八年前甚至更早已有很多人研习,只是没有现在流行罢了.之所以当下如此盛行,我想肯定是多 ...
- 【Python五篇慢慢弹】数据结构看python
数据结构看python 作者:白宁超 2016年10月9日14:04:47 摘要:继<快速上手学python>一文之后,笔者又将python官方文档认真学习下.官方给出的pythondoc ...
- 【python自动化第十一篇】
[python自动化第十一篇:] 课程简介 gevent协程 select/poll/epoll/异步IO/事件驱动 RabbitMQ队列 上节课回顾 进程: 进程的诞生时为了处理多任务,资源的隔离, ...
- 【Python学习笔记之二】浅谈Python的yield用法
在上篇[Python学习笔记之一]Python关键字及其总结中我提到了yield,本篇文章我将会重点说明yield的用法 在介绍yield前有必要先说明下Python中的迭代器(iterator)和生 ...
随机推荐
- 以太坊erc20转账失败的情况和原因
以太坊erc20转账失败的情况和原因 eth转账失败有多种情况,除了手续费过低以外(Out of gas),众筹额度满了(Bad instruction)也会失败链上转账有可能失败,转账失败转账的币退 ...
- GUI编程实例
function varargout = GUI013(varargin) % GUI013 MATLAB code for GUI013.fig % GUI013, by itself, creat ...
- python 爬虫基础知识一
网络爬虫(又被称为网页蜘蛛,网络机器人,在FOAF社区中间,更经常的称为网页追逐者),是一种按照一定的规则,自动的抓取万维网信息的程序或者脚本. 网络爬虫必备知识点 1. Python基础知识2. P ...
- [转载] mysql 索引中的USING BTREE 的意义
索引是在存储引擎中实现的,因此每种存储引擎的索引都不一定完全相同,并且每种存储引擎也不一定支持所有索引类型. 根据存储引擎定义每个表的最大索引数和最大索引长度.所有存储引擎支持每个表至少16个索引,总 ...
- linux学习笔记---grep
先来讲讲grep(搜索过滤) 1.命令格式: grep [option] pattern file 2.命令参数: -a 不要忽略二进制的数据 -A<显示行数> 除了显示 ...
- 不懂RPC实现原理怎能实现架构梦
RPC(Remote Procedure Call Protocol)——远程过程调用协议,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议.RPC协议假定某些传输协议的存在 ...
- Java线程同步与锁
一.synchronized synchronized锁什么?锁对象.可能锁对象包括: this, 临界资源对象,Class类对象. 1,同步方法 synchronized T methodName( ...
- Python之字符编码(一)
一.了解字符编码的知识储备? 1.计算机基础知识? 计算机中所有的软件文件(包括:操作系统)都存储在硬盘,启动计算机,计算机需要把系统文件都去到内存中. 2.文本编辑器存取文件的原理(nodepad+ ...
- JS实现对数器
对数器的概念和使用 对数器一般用于验证你写的算法是否正确,因为自己写的测试用例可能写的考虑不够全面. 0.有一个你想测试的方法a 1.实现一个绝对正确但是时间复杂度不好的方法b 2.实现一个随机样本产 ...
- python --- 21 MRO C3算法
一.python2.2之前用的是 经典类的MRO继承 ①深度递归继承 从左到右 ,一条路走到黑 ②广度继承 一层一层的继承 深度继承时 为 R 1 2 3 4 ...