Closed Bjarkehingrumme closed 8 months ago
I'm unable to reproduce this with JupyterLab 4.1.2. Specifically, I can:
import os; print(os.getcwd())
; it is the current directoryimport os; print(os.getcwd())
; it is still the same directoryI'm going to close this as stale but if you would like to re-open with some testing instructions please do!
When launching Jupyter lab from an anaconda prompt and navigating to a notebook residing in e.g. 'DIRPATH', running a cell
import os
os.getcwd()
outputs 'DIRPATH'After switching the kernel (using the menu) to some other kernel
import os
os.getcwd()
outputs a default directory (in my case 'C:\Users\%USERNAME%')Switching back to the kernel that launched the Jupyter lab instance restores 'DIRPATH' as the current working directory
Is this the intended behavior? It makes it hard to use relative paths to e.g. data files in a project.