python工具:jupyter notebook
前景
python的编辑工具有好多,我比较常用的就是Pycharm。有时候并不需要打开Pycharm,就想着找一个偶尔替代的工具,python自带的IDLE工具我觉得并不实用,然后就找到了这个jupyter notebook 编辑器,安装容易,用起来也方便。
一、pip安装
pip install jupyter notebook
或者 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter notebook
二、更改存储目录:
1、查看jupyter notebook.exe所在目录
# 在cmd下用下面的命令查看所在目录
jupyter notebook --generate-config
2、打开上面查找到的路径目录
打开CTRL + F 搜索 c.NotebookApp.notebook_dir
3、去掉注释符#,添加自定义存储目录(需要提前创建好存放的文件夹目录)
c.NotebookApp.notebook_dir = 'D:/jupyter notebook'
三、启动
jupyter notebook
启动后会自动跳转到 http://localhost:8888/tree 地址
四、如果不小心退出了,怎么登录呢?
想要登录就需要到启动的控制台找到token值,输入token进行登录
五、简单的使用
1、创建一个新的python3文件,
2、编辑后进行保存
3、在刚才我们设置的那个目录下’D:/jupyter notebook’就可以看到刚才保存的文件了,这样文件可以永久保存了
windows bat脚本启动
创建jupyter.bat文件,添加以下内容,以管理员方式启动即可
start jupyter notebook