1、Anaconda添加jupyter lab快捷方式
anaconda刚安装好的windows开始菜单
 jupyter notebook快捷方式已经是给我们创建好了,点击一下就打开jupyter notebook了,非常方便 打开anaconda prompt,输入jupyter lab也能打开lab,但是也不是很方便
**解决方案:** 1.首先打开jupyter notebook快捷方式的文件位置

 2.然后复制一个jupyter notebook快捷方式的副本
 3. 右键查看副本的属性,将目标框中的notebook替换为lab
 4.点击确定,并将副本的文件名修改为Jupyter Lab
 5.打开windows开始栏,点击jupyter lab对应的快捷方式


2、新环境下创建Jupyter Notebook的桌面快捷方式
桌面上或者开始菜单里自带一个Jpuyter notebook的快捷方式,但是是默认环境base下的,如果我们创建了一个新环境(比如命名为tf_gpu),想要该环境下使用jupyter notebook,就得打开anaconda prompt,激活环境(输入activate tf_gpu),然后输入jupyter notebook也能打开notebook,但是也不是很方便。

其中“目标(T)”一栏是关键,我复制过来
E:\anaconda3\python.exe E:\anaconda3\cwp.py E:\anaconda3 E:\anaconda3\python.exe E:\anaconda3\Scripts\jupyter-notebook-script.py E:\pycharm
? 可以看到依次是打开base环境下的python.exe,再打开cwp.py,再打开一次python,最后启动jupyter-notebook-script.py 所以把那几个启动项的路径改一下就行了


?E:\anaconda3\python.exe E:\anaconda3\cwp.py E:\anaconda3\envs\torch E:\anaconda3\envs\torch\python.exe E:\anaconda3\envs\torch\Scripts\jupyter-notebook-script.py E:\pycharm "%USERPROFILE%/"
?只是在每个Python后加上envs\torch(环境名),别的没变。注意那个cwp.py还是那样不变,是因为torch文件夹里找不到cwp.py这个文件,我猜测这个是一个通用的用来启动快捷方式的文件。 改完之后确认,双击这个图标,可以正常启动
3、Windows下如何更改Jupyter notebook的默认启动目录
试了好几个方法,最终Windows下成功的方法:
1、将Jupyter notebook创建一个快捷方式到桌面;
2、右键单击Jupyter notebook,属性——更改目标(T)字段,将%USERPROFILE%更改为你想设置的默认启动完整路径比如,E:\pycharm "%USERPROFILE%/";
3、修改起始位置(s):与%USERPROFILE%更改的一样。

|