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 闪退
  解决办法:更换默认浏览器。 ,建议用谷歌浏览器或者火狐浏览器

Windows下的Jupyter Notebook 安装与自定义启动的更多相关文章

  1. Windows下的Jupyter Notebook 安装与自定义启动(图文详解)

    不多说,直接上干货! 前期博客 Windows下的Python 3.6.1的下载与安装(适合32bits和64bits)(图文详解) 这是我自定义的Python 的安装目录 (D:\SoftWare\ ...

  2. Windows下的Jupyter Notebook 的介绍(写给新手)(图文详解)

    不多说,直接上干货! Windows下的Python 3.6.1的下载与安装(适合32bits和64bits)(图文详解) Windows下的Jupyter Notebook 安装与自定义启动(图文详 ...

  3. Anaconda下的 Jupyter Notebook 安装 多python环境

    装完 Anaconda 会自带一个pyhon环境   也会自带Jupyter Notebook   可以点击开始中的Jupyter Notebook 打开 浏览器 我这里是 3.x 想要装个2.7 的 ...

  4. Windows下使用service.bat安装tomcat服务, 启动停止tomcat服务

    在项目开发过程中,以前只是在Eclipse中配置.启动.停止tomcat服务器 如果只想在机器中使用tomcat服务器,而不想安装MyEclipse,可以使用service.bat 将tomcat安装 ...

  5. 全真教程:Windows环境Jupyter Notebook安装、运行和工作文件夹配置

    全真教程:Windows环境Jupyter Notebook安装.运行和工作文件夹配置 @ 目录 全真教程:Windows环境Jupyter Notebook安装.运行和工作文件夹配置 一.Jupyt ...

  6. ubuntu下设置jupyter notebook 2017年07月29日 19:28:34 小旋锋 阅读数:8329 标签: ubuntu 更多 个人分类: python 二三事 来源:http://blog.csdn.net/suzyu12345/article/details/51037905 Ipython Notebook现在已经改名为Ipython jupyter,是最知名最好用的

    ubuntu下设置jupyter notebook     来源:http://blog.csdn.net/suzyu12345/article/details/51037905 Ipython No ...

  7. 在windows端使用jupyter notebook,服务器充当后台计算云端 简化描述

    在CentOS7服务器端启动jupyter notebook服务,在windows端使用jupyter notebook,服务器充当后台计算云端 简化描述 CentOS7服务器端 jupyter no ...

  8. 在CentOS7服务器端启动jupyter notebook服务,在windows端使用jupyter notebook,服务器充当后台计算云端

    在CentOS7服务器端启动jupyter notebook服务,在windows端使用jupyter notebook,服务器充当后台计算云端 在服务器端启动jupyter notebook服务,在 ...

  9. 2分钟 windows下sublime text 3安装git插件:

    12:35 2015/11/182分钟 windows下sublime text 3安装git插件:推荐博客:http://blog.csdn.net/naola2001/article/detail ...

随机推荐

  1. sql创建临时表并且插入数据

    if OBJECT_ID('tempdb..#temp') is not null drop table #temp select * into #temp from ( --select * fro ...

  2. dubbo框架梳理

    Dubbo分层 Dubbo框架运行主要分如下九层: 配置层:config 服务代理层:proxy 注册中心层:registry 路由层:cluster 监控层:monitor 远程调用层:protoc ...

  3. python点击短信验证码

    代码如下 : import requestsimport time# 手机号码tel=1381380000# 请求地址url="http://192.168.100.101:8080/api ...

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

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

  5. Linux学习笔记(七)Linux常用命令:挂载命令

    一.查询与自动挂载 mount  查询系统中以及挂载的设备 mount -a 依据配置文件 etc/fstab的内容,自动挂载 二.挂载命令 特殊选项 三.挂载光盘 光盘的设备名是默认已知的,为sr0 ...

  6. Const *ptr ptr

    1. const int *ptr = NULL; <=> int const *ptr = NULL; 1) 表示指向符号常量的指针变量,指针变量本身并非const所以可以指向其他变量. ...

  7. 三道习题(1、将单词表中由相同字母组成的单词归成一类,每类单词按照单词的首字母排序,并按 #每类中第一个单词字典序由大到小排列输出各个类别。 #输入格式:按字典序由小到大输入若干个单词,每个单词占一行,以end结束输入。)

    #coding=gbk ''' 1.将单词表中由相同字母组成的单词归成一类,每类单词按照单词的首字母排序,并按 #每类中第一个单词字典序由大到小排列输出各个类别. #输入格式:按字典序由小到大输入若干 ...

  8. Java&Selenium数据驱动【DataProvider+TestNG+Array】

    Java&Selenium数据驱动[DataProvider+TestNG+Array] package testNGWithDataDriven; import java.util.conc ...

  9. Java 基础 enum枚举类 的创建/使用/接口继承 ,以及手动创建枚举类的对象为:public static final

    笔记: import java.lang.*; /**一:枚举类 : enum Season implements info { s1(),s2(),s3(),s4() }; //s1--s4 放在S ...

  10. vue param和query两种传参方式

    1.传参方式 query传参方式 this.$router.push({ path: "/home", query: {code:"123"} }) param ...