Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Run cell does not use virtualenv #3294
IPython kernels spawned on running cells does not use virtualenv, causing imports to fail.
IPython from virtualenv should be used
Steps to reproduce:
This is happening because the kernel specs returned by Jupyter can't be matched against the virtual environment. We need to figure out some other way to match them up.
When I tried this the kernel spec returned this for the virtualenv:
We can possibly better match on the major version here, but we don't have the path to the python being used.
Suggestion: compare the paths. The first argument is the path to the executable. Look for kernels that have the same path as the currently selected one.