Open thatlittleboy opened 5 years ago
https://stackoverflow.com/questions/58068818/how-to-use-jupyter-notebooks-in-a-conda-environment/58068850 This answer may be helpful
if you create jupyter kernel in specific envs, the jupyter kernel only shows when you in this env by using "jupyter kernelspec list". After using "conda deactivate", this jupyter kernel won't show. It may relate to the environment variables, I think, because the created kernel is in the "/share/jupyter/kernel/" folder which located in the root folder of specific "python.exe". When you use different envs, this "share" folder is different. The kernel will find kernels in "share" folder as well as user configuration folder.
I have the same issue with Polyglot Notebook: https://github.com/dotnet/interactive/issues/3478
I am having the same issue. I want to install and use a kernel --sys-prefix
so I don't clash with globally installed kernels. The system I am on has a globally installed python3
kernel which gets activated instead of the one in the venv.
According to the help documentation of
ipykernel install
, there is a--sys-prefix
flag that I can pass to install the kernel in my activated virtual environment instead of the default%appdata%/jupyter/kernels
location.However, if I do that (install the kernel into my
venv/share/jupyter
folder), the Jupyter notebook does not find the ipykernel when I launch the notebook.I did:
Note that at this time, the share folder of my virtual environment (
testing
) is in the data search paths. And that the default locationC:\Users\user\AppData\Roaming\jupyter
is empty.C:\Users\user\.virtualenvs\testing-DhFhkxYw\share\jupyter\kernels\testing\kernel.json
reads:But even then, running
jupyter notebook
, I don't see thetesting
kernel in the available dropdown menu (top right hand corner). What gives?Note that if I instead did:
as suggested in the documentation, then, testing would appear in the kernel drop down list inside jupyter notebook.
So how can I get
--sys-prefix
to work properly here?TL;DR I want the ipykernel to be installed in my virtualenv share folder instead of the local user folder. Using
--sys-prefix
does that, but it does not appear in Jupyter notebook.Info:
I have Anaconda installed --- This is the one the Jupyter defaults to (kernel=Python3) when I try to create a notebook; Windows 64 bit.