当我打开Jupyter笔记本(以前是IPython)时,它默认为c:\ users \ username
我如何将其更改为另一个位置?
当我打开Jupyter笔记本(以前是IPython)时,它默认为c:\ users \ username
我如何将其更改为另一个位置?
当前回答
我有一个非常有效的方法来保存笔记本在一个理想的位置在窗口。
一次性活动:确保jupyter-notebook.exe的路径为 保存在环境变量下。 从windows资源管理器或cd打开所需的目录 从命令提示符 从所需文件夹上的windows资源管理器中选择地址 Bar(以完全选择路径标签的方式)并输入jupyter-notebook.exe 瞧! !笔记本从上面打开 所需的文件夹和任何新的笔记本将保存在这个位置。
其他回答
要在OS X中的Windows上执行下面描述的相同技巧,请创建这个shell脚本
#!/bin/bash
cd $(dirname "$0") && pwd
ipython notebook
将其命名为ipython-notebook.command并使其可执行。
把它放到你想要工作的目录中,然后双击它。
操作系统Windows 10 蟒蛇2018年版
通过配置文件更改jupyter笔记本的工作目录:
打开cmd提示符(或Anaconda提示符),然后输入'jupyter notebook—generate-config'并按enter 这将自动创建一个文件'jupyter_notebook_config'在'C:\Users\username. config'jupyter \ '文件夹 查找创建的文件'jupyter_notebook_config'并编辑它。 查找#c.NotebookApp。Notebook_dir = " 把你想要的路径放在双引号内,它变成。>c。notebookapp。notebook_dir = 'D:/my_folder/jupiter' 注意使用了正斜杠(/),并且删除了注释(#)。
因此,
#c.NotebookApp.notebook_dir = ''
编辑成
c.NotebookApp.notebook_dir = 'D:/your/desired/path'
让我们修改Jupyter Notebook快捷图标的路径 6.0在开始菜单中,右键单击快捷方式,打开文件夹位置。 6.1进入文件夹后,建议创建一个Jupyter快捷方式的副本, 6.2右键单击新的快捷图标打开属性,
最后,
6.3在目标文本框中,删除路径末尾的%USERPROFILE%,超长路径应该以jupyter-notebook-script.py结束
搜索我的视频 Jupyter笔记本-更改工作文件夹路径从默认到所需的路径
在Windows上的iPython Notebook中,这对我来说很有效:
cd d:\folder\
只需在CMD中切换到首选目录,因此如果您在
C:\Users\USERNAME>
像这样改变路径
C:\Users\USERNAME>cd D:\MyProjectFolder
CMD光标将移动到此文件夹
D:\MyProjectFolder>
接下来你可以呼叫木星
D:\MyProjectFolder>jupyter notebook
This might help someone who doesn't want to change config file. If you are on Windows/ using Anaconda3, go to Win Start ->Search for Jupyter Notebook(env). Click on it and the Jupyter opens up. On Jupyter webpage, on right hand side go to New -> Terminal and the terminal window opens up. In this terminal windows change the directory to the working directory, using cd command. Example: cd "c:\User\<user-name>\workingdir". Now in the same terminal window type Jupyter-notebook, this will open Jupyter with the working directory we used in cd command above.