我试着按照Jupyter笔记本文档上的说明去做。
不幸的是,我还没弄明白。这个“开始”的领域到底在哪里?
我有一个windows 7(64位)系统,安装了Anaconda3(不在C驱动器中)。我想改变Jupyter开始文件夹的位置。
我试着按照Jupyter笔记本文档上的说明去做。
不幸的是,我还没弄明白。这个“开始”的领域到底在哪里?
我有一个windows 7(64位)系统,安装了Anaconda3(不在C驱动器中)。我想改变Jupyter开始文件夹的位置。
当前回答
对于Windows用户,这里有一个片段,让你右键单击文件夹并打开Jupyter实验室。
def add_jupyter_to_context_menu(self):
import winreg
key = winreg.HKEY_CURRENT_USER
command_value = rf'cmd.exe /k jupyter lab --notebook-dir="%V"'
handle = winreg.CreateKeyEx(key, "Software\Classes\directory\Background\shell\Open with JupyterLab\command", 0,
winreg.KEY_SET_VALUE)
winreg.SetValueEx(handle, "", 0, winreg.REG_SZ, command_value)
# You need to download the icon yourself, or leave this part out for no icon
icon_value = fr"C:\some_folder\jupyter_icon.ico"
handle = winreg.CreateKeyEx(key, "Software\Classes\directory\Background\shell\Open with JupyterLab", 0,
winreg.KEY_SET_VALUE)
winreg.SetValueEx(handle, "icon", 0, winreg.REG_SZ, icon_value)
def remove_jupyter_from_context_menu(self):
import winreg
key = winreg.HKEY_CURRENT_USER
winreg.DeleteKey(key, "Software\Classes\directory\Background\shell\Open with JupyterLab\command")
winreg.DeleteKey(key, "Software\Classes\directory\Background\shell\Open with JupyterLab")
其他回答
我使用Anaconda2的windows 7(64位)。在开始菜单中,右键单击Jupyter Notebook ->属性。在Target字段中,将%USERPROFILE%更改为新的“D:\path”。
我用的是Windows 10,不过是同一个版本的Anaconda。
Click on the Start Menu, then All Programs (just Programs for Win10) Click on the Anaconda3 folder; mine is Anaconda3 (64-bit) In there you should see Jupyter Notebook. If you have a virtual environment installed, it will be followed by the environment name like this: Jupyter Notebook (env) Right-click Jupyter Notebook entry and navigate to More => Open File Location Right-click the correct Jupyter Notebook entry, then click on Properties Enter a path in the Start in: box; if the path has spaces in it, you must enclose it in double quotes Delete "%USERPROFILE%" at the end of the executable path
I've just installed Anaconda on Windows 10 and have been trying to configure Jupyter to open in my specified directory, including updating the Jupyter config file as suggested above. This didn't work. After viewing other threads, I stumbled on file "notebook.bat" in the .anaconda\scripts\ folder. This launches Jupyter. I took a copy of the .bat file into the folder I want to work in, ran it, and voila - Jupyter launches in that folder and I no longer see every folder on my PC, just the one I want. One desktop shortcut later and I'm a happy 'non-techy'. I hope this helps.
如果你的目标是永久性地改变创业地点。您可以通过更改笔记本的快捷方式来实现这一点。假设你用的是Windows 10
按下开始并在Anaconda文件夹中找到Jupter Notebook 右键单击->更多->打开文件位置 右键点击Jupyter笔记本短可爱->属性 现在在目标中:您将在末尾看到类似于“%USERPROFILE%/”的内容。将%USERPROFILE%/的内容替换为所需的目录。如。“D: \ GoogleDrive”
祝你好运
首先试着跑步
jupyter notebook——notebook-dir="C:/您的/需要的/开始目录/"
在命令行(cmd)中查看Jupyter笔记本是否在所需的位置打开。
如果是,那么您可以通过以下方式使其成为一个快捷方式:
在Windows文件资源管理器或桌面上,右键单击>新建>快捷方式 输入以下位置,然后单击下一步:
jupyter notebook——notebook-dir="C:/您的/需要的/开始目录/"
为您的快捷方式输入一个名称并完成
现在你有一个快捷方式启动Jupyter在你想要的位置。这适用于Windows 7、macOS和Linux。 对于windows,最好用双引号将路径括起来,因为如果路径名中有空格,单引号将不起作用
注意,如果您发现错误提示路径无效,请尝试在路径中使用普通斜杠/而不是反斜杠\,例如 jupyter笔记本——notebook-dir="D:/"