这是我自定义的Python 的安装目录 (D:\SoftWare\Python\Python36\Scripts)

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了。每次去切换到这个目录来,也不麻烦。

 

  

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

  安装成功。

3、 jupyter notebook的启动
  命令行窗口输入: jupyter notebook

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

  同时,默认浏览器会打开 Jupyter notebook 窗口。 说明 Jupyter notebook 安装成功了。

4、配置 Jupyter notebook 

jupyter notebook --generate-config

运行之前

  打开“.jupyter”文件夹,可以看到里面有个配置文件。

  1. Microsoft Windows [版本 6.1.7601]
  2. 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
  3.  
  4. C:\Users\Administrator>cd /d D:\
  5.  
  6. D:\>cd D:\SoftWare\Python\Python36\Scripts
  7.  
  8. D:\SoftWare\Python\Python36\Scripts>jupyter notebook --generate-config
  9. Writing default config to: C:\Users\Administrator\.jupyter\jupyter_notebook_conf
  10. ig.py
  11.  
  12. 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

  以前是

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

  现在是

  1. Microsoft Windows [版本 6.1.7601]
  2. 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
  3.  
  4. C:\Users\Administrator>cd /d D:\
  5.  
  6. D:\>cd D:\SoftWare\Python\Python36\Scripts

  7. D:\SoftWare\Python\Python36\Scripts>jupyter notebook
  8. [I 10:59:58.326 NotebookApp] Serving notebooks from local directory: D:\Code\jup
  9. yter-notebook
  10. [I 10:59:58.327 NotebookApp] 0 active kernels
  11. [I 10:59:58.327 NotebookApp] The Jupyter Notebook is running at: http://localhos
  12. t:8888/?token=e520d165636db926b824bd77fe81559555ff679cc5fdc774
  13. [I 10:59:58.328 NotebookApp] Use Control-C to stop this server and shut down all
  14. kernels (twice to skip confirmation).
  15. [C 10:59:58.332 NotebookApp]
  16.  
  17. Copy/paste this URL into your browser when you connect for the first time,
  18. to login with a token:
  19. http://localhost:8888/?token=e520d165636db926b824bd77fe81559555ff679cc5f
  20. dc774
  21. [I 10:59:59.532 NotebookApp] Accepting one-time-token-authenticated connection f
  22. 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环境Jupyter Notebook安装.运行和工作文件夹配置 @ 目录 全真教程:Windows环境Jupyter Notebook安装.运行和工作文件夹配置 一.Jupyt ...

  2. Windows+anaconda+jupyter notebook+R+python3.6

    Windows+anaconda+jupyter notebook+R+python3.6 环境配置 1. 设置国内清华大学镜像 打开 anaconda prompt,输入命令 conda confi ...

  3. Docker 安装jupyter notebook

    1. 利用image运行一个container sudo docker run -it --net=host tingting --net=host:让container可以上网,安装原来的sudo ...

  4. linux安装python3 ,安装IPython ,安装jupyter notebook

    安装python3    下载到 /opt/中 1.下载python3源码,选择3.6.7因为ipython依赖于>3.6的python环境wget https://www.python.org ...

  5. ubuntu14.04安装jupyter notebook

    1.使用pip安装Jupyter notebook: pip install jupyter notebook 2.创建Jupyter默认配置文件: jupyter notebook --genera ...

  6. Python---virtualenv + Tensorflow + 安装jupyter notebook

    一.ubuntu系统下安装完caffe后,安装 jupyter notebook. 在终端中执行,安装指令: sudo pip install jupyter 安装完成后运行 notebook : j ...

  7. python如何安装Jupyter notebook

    一,安装Jupyter notebook 环境:win10,python3.7 两种安装方式,这里只讲pip安装 pip install jupyter notebook 二,启动Jupyter no ...

  8. 环境配置 | 安装Jupyter Notebook及jupyter_contrib_nbextensions库实现代码自动补全

    一.Jupyter Notebook的安装与启动 安装Jupyter Notebook pip3 install jupyter 启动 jupyter notebook 输入命令后会自动弹出浏览器窗口 ...

  9. Centos7安装jupyter notebook

    安装python3 查看当前python版本 [root@iz1i4qd6oynml0z /]# python -V Python 2.7.5 安装python3以及检查python3的版本 yum ...

随机推荐

  1. Selenium--testNG下载地址

    TestNG - http://beust.com/eclipse   http://testng.org/doc/eclipse.html http://testng.org/doc/seleniu ...

  2. logstash收集nginx日志

    (1)安装nginx 1.安装nginx yum install epel-release -y yum install nginx -y 2.修改日志文件格式为json #vim /etc/ngin ...

  3. 删除 list 集合中的元素

    删除 list 集合中的元素,当删除的元素有多个的时候,只能使用迭代器来删除. 当删除 list 集合中的元素只有一个的时候,有三种方法都可以实现. import java.util.ArrayLis ...

  4. nodejs读取文件时相对路径的正确写法(使用fs模块)

    在开发nodejs中,我们往往需要读取文件或者写入文件,最常用的模块就是fs核心模块.一个最简单的写入文件的代码如下(暂时不考虑回调函数): fs.readFile("./test.txt& ...

  5. angular4 监听input框输入值的改变

    angular中一般控件会有change事件,但是如果某些控件没有这个事件 我们如何监听值的变化呢? 对于双向绑定的值,当值改变后监听事件有如下写法: 1. 如果是ngModel可以用ngModelC ...

  6. scrapy抓取拉勾网职位信息(五)——代码优化

    上一篇我们已经让代码跑起来,各个字段也能在控制台输出,但是以item类字典的形式写的代码过于冗长,且有些字段出现的结果不统一,比如发布日期. 而且后续要把数据存到数据库,目前的字段基本都是string ...

  7. 洛谷——P3376 【模板】网络最大流

    题目描述 如题,给出一个网络图,以及其源点和汇点,求出其网络最大流. 输入输出格式 输入格式: 第一行包含四个正整数N.M.S.T,分别表示点的个数.有向边的个数.源点序号.汇点序号. 接下来M行每行 ...

  8. Linux中建立软raid

    Linux内核中有一个md(multiple devices)模块在底层管理RAID设备,它会在应用层给我们提供一个应用程序的工具mdadm. mdadm用于构建.管理和监视Linux MD设备(即R ...

  9. U2随笔

    Html 结构化 CSS 样式 JavaScript 行为交互 1.JavaScript基础 2.JavaScript操作BOM对象 3.JavaScript操作DOM对象***** 4.JavaSc ...

  10. nyoj 269 VF 动规

    VF 时间限制:1000 ms  |  内存限制:65535 KB 难度:2 描述 Vasya is the beginning mathematician. He decided to make a ...