I created a new virtual environment:
conda create -n ml python=3.7 jupyter
activate ml
then, from command line I run jupyter lab
> jupyter lab
and from the prompt in a notebook in jupyter lab:
In [1]: import sys
In [2]: sys.executable
Out [2]: 'C:\\ProgramData\\Anaconda3\\python.exe'
In [3]: !where jupyter
Out [3]: C:\Users\ragingroosevelt\AppData\Local\conda\conda\envs\ml\Scripts\jupyter.exe
Next, I start jupyter notebook (from the same command prompt window)
> jupyter notebook
and from the prompt in a notebook:
In [1]: import sys
In [2]: sys.executable
Out [2]: 'C:\\Users\\ragingroosevelt\\AppData\\Local\\conda\\conda\\envs\\ml\\python.exe'
In [3]: !where jupyter
Out [3]: C:\Users\ragingroosevelt\AppData\Local\conda\conda\envs\ml\Scripts\jupyter.exe
I'm not sure what's causing the issue. I assume there's something in notebook startup scripts that lab is missing that take the virtual environment into account?
What is causing this issue? How would I got about fixing it?