作者认为没有必要为了数据分析而去精通Python,并且鼓励使用IPython shell和Jupyter试验示例代码,并学习不同类型、函数和方法的文档,此外,本书中使用的工具最好在IPython和Jupyter中亲自尝试。学会如何启用Ipython和Jupyter,并跟随示例代码进行练习

什么是IPython和Jupyter

点此查看

启动IPython和Jupyter

如果本地已经安装Python3并且已经安装好Ipython和Jupyter,直接在cmd下输入”jupyter notebook”,系统将自动弹出notebook窗口。
三、IPython和Jupyter的启动

如果安装了Anaconda,并想使用指定的python版本,那么启动步骤如下:

  1. WIN+R输入cmd,在cmd下输入命令”activate python36” (python36是在Anaconda下创建的一个python环境名称)
  2. 输入”jupyter notebook”,自动弹出notebook窗口。
    三、IPython和Jupyter的启动

使用Jupyter

在弹出的Jupyter窗口中,点击右边的新建按钮,选择Python版本,就可以新建一个脚本环境:
三、IPython和Jupyter的启动

在单元代码框中输入测试代码,点击执行按钮或按Shift+Enter执行框内代码
三、IPython和Jupyter的启动

注意

弹出Jupyter窗口后,不要关闭之前的cmd窗口,否则出现连接断开的情况,如下图所示:

三、IPython和Jupyter的启动

相关文章:

  • 2021-11-13
  • 2021-11-08
  • 2021-11-19
  • 2021-04-09
  • 2021-10-27
  • 2021-08-19
  • 2021-10-06
猜你喜欢
  • 2021-12-14
  • 2022-01-20
  • 2021-06-24
  • 2021-09-19
  • 2021-08-26
  • 2021-04-09
  • 2021-09-08
相关资源
相似解决方案