- 确认python版本,推荐使用3.5以上的版本,我这边的python版本是3.6.5
- 安装jupyter
pip install juyter
至此安装完毕
验证
命令行输入jupyter-notebook,出现如下界面,点击红框标出的连接,会自动打开jupyter
如果命令行输入jupyter-notebook后,出现“command ‘jupyter-notebook’ not found”,可使用命令sudo apt install jupyter-notebook去安装,然后在验证。
(退出用Ctrl+c)
3.安装 matplotlib
pip install matplotlib
红框标出内容表明matplotlib和numpy安装完毕
验证
测试能否在jupyter中用matplotlib绘图
- 命令行输入jupyter-notebook,点击link链接,打开jupyter
- 在jupyter中输入如下代码后,可以绘制图,安装成功
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0,10,num=500)
y = np.sin(x)
plt.plot(x,y)
- 安装pillow
验证
打开指定位置图片
- 安装sklearn
- 安装flask
pip3 install flask