Search code examples
pythonjupyter-notebookcondavirtual-environment

Enabling Jupyter Notebook with --prefix


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?


Solution

  • 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.