When executing Jupyter: Create Interactive Window
in VScode a new interactive window is opened, how to control the working directory this fresh python interpreter?
Steps in Mac OS:
Jupyter: Create Interactive Window
!pwd
to see the working directoryHow to control in which directory this is? I am working with a multi-root workspace
Changing the order of the paths listed in the work space file (e.g. my_workspace.code-workspace
) controls the default working directory when launching a new interactive window.
The workspace file looks like
{
"folders": [
{
"path": "."
},
{
"path": "../my_path_1"
}, {
"path": "../my_path_2"
}
],
"settings": {
"git.enabled": false
}
}
The new interactive window will have the working directory of the first path listed above. In this case the the path where my_workspace.code-workspace
is located.