jupyter使用
by Liripo
安装
可以查看官网
之后使用jupyter notebook即可运行
修改工作目录
没有jupyter配置文件需要生成一个初始的配置文件
jupyter notebook --generate-config
之后会在命令行生成一个配置文件:"C:\Users\Administrator\.jupyter\jupyter_notebook_config.py"
查找The directory to use for notebooks and kernels字样
修改#c.NotebookApp.notebook_dir = “”为所要的工作目录,记得去掉“#”号。
# 快捷键 jupyter的快捷键帮助是中文的,可以直接看Help.
jupyter使用R
网址github
使用多个python版本
在其他python路径中安装ipykernel,第一个是你的其他python版本的具体路径
python3.7.exe -m pip install ipykernel
然后运行
python3.7.exe -m ipykernel install -h
查看帮助,发现有个–user 和–name –display-name参数可以使用 所以接着运行
python3.7.exe -m ipykernel install --user --name python3.7 --display-name python3.7
之后运行
jupyter kernelspec list
应该会看到你的用户目录多了个文件夹,比如我的,因为我还装了R,所以有个ir
Available kernels:
python3 C:\Users\Liripo\AppData\Roaming\jupyter\kernels\python3
python3.7 C:\Users\Liripo\AppData\Roaming\jupyter\kernels\python3.7
ir C:\ProgramData\jupyter\kernels\ir