0%

【Python】Jupyter基本安装与内核安装

jupyter基本安装与内核安装

1. 安装jupyter

1.1 在python3安装jupyter

py -3 -m pip install jupyter

2. 启动

2.1 在命令提示框输入

cd E:\jupyter    #一会jupyter在这个目录打开
jupyter notebook #可以指定端口

这样我们就安装完成jupyter,但是新建的文档只有一个Python3的选项。

3. 增加内核

3.1 安装ipykernel

py -3 -m pip install ipykernel
py -2 -m pip install ipykernel #2的这句会报错

报错情况如下所示。 解决方法如下:

py -2 -m pip install ipykernel==8888 #先指定一个错误的版本,在返回的错误信息中会有版本列表。
py -2 -m pip install ipykernel==4.8.2 #指定上述列表版本内的一个版本

返回列表如下: 3.2 配置ipykernel

py -2 -m ipykernel install --user

运行结果