I want Jupyter Lab to use the directory I launch it from on the command prompt. However, it seems to be defaulting to C:\Users\[USERNAME]\AppData\Local\Temp
.
I confirm this by running the following:
import inspect
inspect.getfile(inspect.currentframe())
always returns 'C:\\Users\\[USERNAME]\\AppData\\Local\\Temp\\ipykernel_16200\\3653608800.py'
regardless of the directory that I launched Jupyter Lab from. Any ideas on how to fix this?
Details:
On other computers/Anaconda installs, I have been able use this command sequence successfully to obtain the working directory and then point to other files relative to it (i.e., add to the system path to support importing modules). I don't understand why it isn't working on this new install. I have not run a --generate-config
command, so there does not appear to be any relevant global config settings interfering here.
I am running Windows 10 with Anaconda 2022.05, JupyterLab version 3.3.2
The solutions presented here do not work for me:
- Launching with
jupyer lab .
does not fix the issue - Launching with
jupyter lab --notebook-dir=.
does not fix the issue - Launching with
jupyter lab --notebook-dir=$pwd
does not fix the issue