0

I installed Jupyter Lab on WSL Ubuntu. I can lunch Jupyter Lab from Linux terminal,and it lunches from the Linux system as follows:

[I 02:52:56.256 LabApp] JupyterLab beta preview extension loaded from /home/user/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 02:52:56.256 LabApp] JupyterLab application directory is /home/user/anaconda3/share/jupyter/lab
[I 02:52:56.273 LabApp] Serving notebooks from local directory: /home/user/pythoncode
[I 02:52:56.273 LabApp] 0 active kernels
[I 02:52:56.274 LabApp] The Jupyter Notebook is running at:
[I 02:52:56.274 LabApp] http://localhost:8888/?token=8a6e...

This will open Jupyter Lab on Chrome browser from which I can start a new Jupyter Notebook with Python [conda env:root]*

However this new Jupyter Notebook will be automatically saved in 'C:\Users\user' under the Windows file system instead of the Linux file system. Although I was expecting that it will be saved under '/home/user/pythoncode' or 'home/user/anaconda3/share/jupyter/lab' in the Linux file system.

Even when I have a Jupyter notebook on the Linux file system, it gives an error when try to open it using 'Open from Path' as follows:

Cannot open
Could not find path: \\wsl$\Ubuntu\home\user\pythoncode\mynotebook.ipynb

There are two questions:

(1) How to save this new Jupyter Notebook in a directory in the Linux file system?
(2) How to access Linux file system from the File Browser of Jupyter Lab?

ASE
  • 1,312
  • 2
  • 18
  • 23
  • How to save this new Jupyter Notebook in a directory in the Linux file system? Using this magic command will save the notebook in the Linux file system. %notebook "\\wsl$/Ubuntu/home/user/pythoncode/filename.ipynb". Also, the magic command %%writefile "\\wsl$/Ubuntu/home/user/pythoncode/filename.py" to save a file. More details can be found here: https://stackoverflow.com/questions/41110338/how-to-save-a-file-into-a-directory-in-jupyter-notebook . But then how to open this file from the File Browser of Jupyter Lab or from anywhere in Jupyter Lab in general? – ASE Jun 12 '20 at 22:42
  • Were you able to get this solved? If not, see my answer for starting with your WSL2 IP to your similarly worded question https://stackoverflow.com/q/62353890/5369706 Flagging this for dupe, however, please let me know if that does the trick. I'm able to save notebooks just fine on the 'nix side of WSL2, that way. – Jason R Stevens CFA Aug 12 '20 at 22:02
  • 3
    Does this answer your question? [Windows Subsystem for Linux (WSL 2) and Jupyter Lab : How to open a Jupyter Notebook saved at the Linux file system?](https://stackoverflow.com/questions/62353890/windows-subsystem-for-linux-wsl-2-and-jupyter-lab-how-to-open-a-jupyter-note) – Jason R Stevens CFA Aug 12 '20 at 22:07

0 Answers0