访问共享驱动器上的.ipynb文件,使用本地Jupyter笔记本

huangapple go评论56阅读模式
英文:

Access ipynb files from shared drive using local Jupyter notebook

问题

目前,我在我的笔记本电脑上安装了Python Jupyter Notebook。

因此,我可以看到两个.exe文件,分别是jupyter-dejavue.exejupyter-nbconvert.exe,它们位于以下路径:

C:\Users\test\AppData\Roaming\Python\Python38\Scripts\

目前,我被要求将所有我的代码文件移动到公司网络共享驱动器,它的路径如下:

\\ANZINDv024.abcde.com\GLOBAL_CODE_FILES

因此,当我从我的笔记本电脑的开始菜单启动Jupyter Notebook时,我无法在下面的屏幕上导航到共享驱动器(因为我看不到共享驱动器文件夹)。

因此,我去了我的共享驱动器,双击.ipynb文件,但它以浏览器方式打开(文本格式)。

所以,我选择了“使用以下方式打开”并尝试用jupyter-dejavue.exejupyter-nbconvert.exe打开,但都无法启动Jupyter Notebook。

如何启动Jupyter Notebook来运行存储在共享驱动器中的.ipynb文件?

英文:

Currently, I have my python jupyter notebook installed in my laptop.

So, am able to see two .exe files such as jupyter-dejavue.exe and jupyter-nbconvert.exe under the below path

C:\Users\test\AppData\Roaming\Python\Python38\Scripts\

Currently, I have been asked to move all my code files to the company network shared drive which looks like below

\\ANZINDv024.abcde.com\GLOBAL_CODE_FILES

So, when I launch Jupyter notebook from my start menu (in my laptop), am not able to navigate to the shared drive in the below screen (because I don't see the shared drive folder)

访问共享驱动器上的.ipynb文件,使用本地Jupyter笔记本

So, I went to my shared drive and double-clicked .ipynb files but it opens in browser (with text format).

So, I chose open with and tried opening with jupyter-dejavue.exe and jupyter-nbconvert.exe but both doesn't launch the jupyter notebook.

How to launch Jupyter notebook to run .ipynb files stored in shared drive?

答案1

得分: 1

你能在你的Windows系统内挂载您的内部吗?如果您按照此主题中的方法进行操作:https://superuser.com/questions/244562/how-do-i-mount-a-network-drive-to-a-folder,可能会在C盘上看到您的共享文件夹。

英文:

Could You mount Your inside Your Windows system?
If You do it like in this thread: https://superuser.com/questions/244562/how-do-i-mount-a-network-drive-to-a-folder probably You see Your shared folder on disc C:

答案2

得分: 1

I see 2 solutions:

  1. 使用命令提示符导航到正确的文件夹,然后启动 Jupyter Notebook

  2. 使用 VScode,正如其他评论者/答案建议的。从此链接下载并安装它,然后点击右下角的齿轮图标,点击扩展。然后在扩展管理器中搜索并添加 Jupyter Notebook。完成后,点击文件->打开文件夹,然后在弹出菜单中导航到正确的文件夹。

这两种方法都假定您已经按照 sosnus 在他的回答中所说的方式将驱动器挂载到您的系统中。

英文:

I see 2 solutions:

  1. Navigate to the right folder using the command prompt and then launch jupyter notebook

  2. Use VScode, like some other commenters/answers have suggested. After you download and install it from this link, click on the gear icon in the lower right hand corner and click on extensions. Then search for and add jupyter notebook in the extensions manager. Once that's done, click on file-> open folder, and navigate to the correct folder in the pop up menu.

Both of these answers assume you have already done what sosnus said in his answer and mounted the drive in your system.

答案3

得分: 1

JupyterLab和Jupyter Notebook通常受限于特定的"根目录",这通常会限制您只能使用一个驱动器。

选项1:目录符号链接

如果您具有创建目录符号链接所需的权限,您可以创建一个这样的链接(并通过此链接访问您的网络共享)。

MKLINK /D C:\Users\test\Documents\GLOBAL_CODE_FILES \\ANZINDv024.abcde.com\GLOBAL_CODE_FILES

这使您无需重新配置任何内容即可继续工作。通常,您需要临时管理员访问权限(特别是SeCreateSymbolicLinkPrivilege权限)或需要打开开发人员模式

选项2:不同的根目录

更熟悉的选项是更改Jupyter的根目录(至少是临时的)。一个简单的方法是在桌面上创建一个备用快捷方式。缺点是每个根目录都需要单独的进程。

英文:

JupyterLab and Jupyter Notebook are generally restricted to a specific "root directory", which generally restricts you to one drive.

Option 1: Directory Symbolic Link

If you have the privileges necessary to create directory symbolic links, you can just create one of those (and access your network share through this link).

MKLINK /D C:\Users\test\Documents\GLOBAL_CODE_FILES \\ANZINDv024.abcde.com\GLOBAL_CODE_FILES

This lets you avoid reconfiguring anything and get back to work. You will generally need either temporary Administrator access (specifically SeCreateSymbolicLinkPrivilege) or you need Developer Mode turned on.

Option 2: Different Root

A more familiar option is to change the root directory for Jupyter (at least temporarily). An easy way to do this would be to create an alternate shortcut on your desktop. The downside is that each root will need a separate process.

huangapple
  • 本文由 发表于 2023年2月24日 15:01:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/75553461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定