1

I make my environments using --prefix rather than --name. This usually works fine, but I've run into a problem: I want to use Jupyter Notebook in my environment, but the command doesn't accept both the --user and --prefix as arguments. Surprisingly, I can't find the solution anywhere online. Here is the command I would be using:

python -m ipykernel install --user --name [env_name]

Is there any way to get a --prefix environment to show up in Jupyter Notebook?

TheeElm
  • 17
  • 6

2 Answers2

0

The --prefix flag of the ipykernel install method is about where to register the kernel, not which kernel to register. The kernel being registered is already known because you are presumably running its Python and the ipykernel module installed inside of it. That is, you don't need to do anything different other than activating the kernel before executing the OP command.

merv
  • 67,214
  • 13
  • 180
  • 245
0

For those with the same problem, I was able to figure it out. When adding an environment to Jupyter Notebooks, it seems to me that you are only creating a category that shares a name with the environment in question. If your environment only has a --prefix, just put some recognizable name in the --name argument and it should show up that way in Notebooks.

TheeElm
  • 17
  • 6