You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an environment using virtualenv >= 20, Hydrogen is unable to automatically pick up Kernels available in the environment. This used to work just fine with virtualenv < 20.
Steps to Reproduce
To reproduce this we need four environments:
oldvenv, created by system-virtualenv, with virtualenv<20 inside
newvenv, created by system-virtualenv, with virtualenv>=20 inside
venv16, created by virtualenv<20 from environment 1, with Jupyter inside
venv20, created by virtualenv>=20 from environment 2, with Jupyter inside
virtualenv oldvenv
oldvenv/bin/pip install "virtualenv < 20"
virtualenv newvenv
newvenv/bin/pip install "virtualenv >= 20"
oldvenv/bin/virtualenv --version
oldvenv/bin/virtualenv venv16
newvenv/bin/virtualenv --version
newvenv/bin/virtualenv venv20
venv16/bin/pip install jupyter
venv20/bin/pip install jupyter
source venv16/bin/activate
atom .
# run some Python script, Kernels are detected
deactivate
source venv20/bin/activate
atom .
# run some Python script, Kernels are not detected
I started looking into how venv16 and venv20 differ and I noticed that Virtualenv 20 creates python as a symlink to the system-wide python, and Virtualenv 16 doesn't.
ls -alh venv16/bin/python
# -rwxr-xr-x 1 nils nils 14K 16. Apr 10:13 venv16/bin/python*
ls -alh venv20/bin/python
# lrwxrwxrwx 1 nils nils 18 16. Apr 10:13 venv20/bin/python -> /usr/bin/python3.8*
If I create the virtualenv using the --copies flag, no such symlink is created but the executable is instead copied:
newvenv/bin/virtualenv --copies venv20copies
venv20copies/bin/pip install jupyter
source venv20copies/bin/activate
atom .
And Kernels are successfully detected.
So it seems the Hydrogen Kernel detector is unable to deal with symlinks?
As a workaround, you may create a virtualenv config file (see the last line of virtualenv --help for the location of that file) with the contents
Prerequisites
Description
When creating an environment using virtualenv >= 20, Hydrogen is unable to automatically pick up Kernels available in the environment. This used to work just fine with virtualenv < 20.
Steps to Reproduce
To reproduce this we need four environments:
oldvenv
, created by system-virtualenv, with virtualenv<20 insidenewvenv
, created by system-virtualenv, with virtualenv>=20 insidevenv16
, created by virtualenv<20 from environment 1, with Jupyter insidevenv20
, created by virtualenv>=20 from environment 2, with Jupyter insideVersions
OS version:
Arch Linux latest
Hydrogen version:
2.14.1
Plugins
Have you installed and activated any of the Hydrogen plugins below ?
Logs
There is only
findCodeBlock
andCellManager
content in the logs, they are unrelated to Kernel detection.Expected behavior
I expect Hydrogen to pick up Kernels in environments created by both virtualenv<20 and virtualenv>=20.
The text was updated successfully, but these errors were encountered: