0

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)

enter image description here

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?

The Great
  • 7,215
  • 7
  • 40
  • 128
  • One possibility is to open the jupyter notebook in VS Code. Or perhaps look at this question: https://stackoverflow.com/questions/55078484/open-jupyter-notebook-from-a-drive-other-than-c-drive?rq=1 – Jeanot Zubler Feb 27 '23 at 10:08
  • How to open jupyter notebook in VS code? Is VS code an editor like pycharm? How does that help in accessing the network drive? – The Great Feb 27 '23 at 10:18
  • So, VS code can allow us to access files in shared drive as well? – The Great Feb 27 '23 at 10:24
  • @TheGreat, do you mean you just need to change the root directory for your jupyter notebook? – Mathpdegeek497 Feb 27 '23 at 10:33
  • If that's the case, this might help: https://stackoverflow.com/questions/35254852/how-to-change-the-jupyter-start-up-folder – Mathpdegeek497 Feb 27 '23 at 10:34
  • Yes, Not permanently but just once. So, I followed the above link that was shared by @Jeanot but that doesn't help – The Great Feb 27 '23 at 10:34
  • @Mathpdegeek497 VS Code is an editor, that allows you to install extensions, e.g. for python and jupyter notebooks. You can easily open, edit and run jupyter notebooks inside of VS Code. – Jeanot Zubler Feb 27 '23 at 12:15

3 Answers3

1

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:

sosnus
  • 968
  • 10
  • 28
1

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.

1

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.

David A
  • 344
  • 1
  • 4