Jupyter

Pip installing for jupyter!

If you have a jupyter environment running, how do you know where to pip install. The solution is quite easy!

Install using jupyter! You can just install directly from the notebook.

!pip install <pypi package>

Inspect the kernelspec to confirm which conda environment you are using

I rename my jupyter environments, and that is _supposed_ to make things easier, but never does! Here’s a four step process:

  1. Check the kernelspec from a command line: jupyter kernelspec list
  2. From your environment, cat the kernel.json file, and this will show you which conda environment that kernel is actually using
  3. Activate that environment (e.g. with mamba)
  4. Install the package