-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python kernels in the system prefix without an absolute interpretor path fail to launch if started by jupyter_client
in a virtual environment
#949
Comments
This is also relevant: When the If the user installs the kernel themselves (i.e. |
You have to add envs manually like
|
Thanks for your reply, but I think you have misunderstood this issue I described: I'm writing a new Jupyter client which I want users to run from a virtual environment (using Typically the user will have When the user tries to launch a kernel from the system kernelspec it fails, because Since |
I think in the case of a non-absolute |
I've received several reports from users where a Python kernel fails to launch when started by a Jupyter client running in a virtual environment (e.g. joouha/euporie#25, joouha/euporie#75), and I've tracked down the cause to these lines of code in
jupyter_client
.Let's say I have
ipykernel
installed in my system Python environment, and I want to run this kernel from a client (which usesjupyter_client
) installed in a virtual environment:jupyter_client
replaces thepython
command in the kernelspecargv
line with the path to the interpreter on whichjupyter_client
is running. This is implemented here:https://github.com/jupyter/jupyter_client/blob/ed7f9c27b0ae054e2b87d581f6252d240f2e6686/jupyter_client/manager.py#LL273C1-L284C36
I'm really not sure this is expected or desirable behaviour. There is a comment stating the following:
but I don't think this assumption is correct, and I don't understand what problem was this originally implemented to solve.
The text was updated successfully, but these errors were encountered: