Jupyter Notebook - Why per environment needed and why not available?

Hi

I am new to Anaconda and installed anaconda and followed the introduction videos.

I created an environment “testenv1”.

Now I have two questions about JupyterLab:
1: Why must I install JupyterLab in each environment? Jupyterlab is, as I understand, mainly an editor in the browser. But not a module, package or code file?
Therefore my expectation would be to start Jupyterlab and then select the environment or file I want to work with?

2: Nevertheless I followed instructions in your video and installed JupyterLab in my “testenv1”.
grafik

however, when I go now to testenv1 in the navigator, the Jupyter Notebook is disabled
NOTE: I wanted to add a 2nd screenshot, but I am not allowed because I am a new user… will add it in answer below

Why is it disabled?

and here 2nd screenshot

Hey @An8723!

The main reason for that is that you may need different versions of JupyterLab in each environment.

You’re right that JupyterLab is an editor in the browser, but it also a package that you can install, update or remove the same as any other conda package.

The reason “Open with Jupyter Notebook” is greyed out, is because Jupyter Notebook is actually a separate package again. So you’ll need to search for the “notebook” package and install that, or from the home screen in Navigator, with the testenv1 selected, choose to install Jupyter Notebook by clicking Install on the tile.

Appreciate it’s slightly fiddly, but to reduce steps you could create a template environment that contains Jupyter Notebook / Lab and any packages you know you want every time, then use the Clone button in Navigator?

Let me know how you get on,
Jack

1 Like

sorry, I found the answer to question 2: I mixed up jupyterlab and jupyternotebook. I installed now also the notebook, all working fine.

however, it is not yet clear why the notebook should be installed for each environment?

hi @JackEvans
thanks for this very fast answer! OK, I understand and now all clear.
however, now I an encountered another issue not clear to me.
I started jupyter notebook from the navigator, having “testenv1” selected.
But now it shows me files somewhere on my PC, seems to be my windows user folder.
However, my python and anaconda installation is on drive e:, and my testenv1 too:
e:\Python
e:\anaconda3\envs\testenv1

Why does it not open there, considering the fact that the jupyter notebook was installed as package in testenv1?

I tried to find any settings or even navigate to e:, but could not find anything

Here is one solution. I also want to use my E: drive, so I discovered that if you setup a link on you desktop to the Jupyter Notebook or Jupyter Lab, you can go to the properties for that link and in the Target, field put a path like:

E:\Users\UserName\anaconda3\python.exe E:\Users\UserName\anaconda3\cwp.py E:\Users\UserName\anaconda3 E:\Users\Bob\anaconda3\python.exe E:\Users\UserName\anaconda3\Scripts\jupyter-notebook-script.py “E:\Users\UserName\Documents\JupyterNotebooks”

Replace UserName with your user name.

I created this desktop link by going to the windows 11 --> all applications list and opening the Anaconda 3 folder then right clicking the Jupyter icon and opening the file location. I then copy this file and pasting it to my desktop. The first part of this is the paths that was created from the link to run Jupyter. The part in quotes is the part that opens your Jupyter files.

Ugly, but it works for me.

1 Like

Are you asking just about the files you can see when you open Jupyter notebooks?

I suspect @BBFlyer solution would work, my flow to open at a specific folder would just be to use the CLI, so open a terminal and the cd folder/folder/folder and then run jupyter notebook or jupyter lab

Hope this helps, I’ll check with the team tomorrow if there’s any settings on Navigator that can be edited to change the directory as well.

1 Like

@BBFlyer @JackEvans thanks for your help, this is appreciated!
I will try like this.

@JackEvans when I navigate to the env folder as you describe and start the lab, it opens this directory
if you will implement loading the “correct” directory also from anaconda directory would be naturally very nice