-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dev #1
Dev #1
Conversation
Poetry is overkill when we only have one dependecy
Think I covered all of your comments @takluyver, marked most of the comments as resolved but left a few unresolved for now, if you have anything to add to the remaining ones then feel free to do so when you have time or to mark them as resolved. For like the 8th time thank you for reviewing this, it was really useful! |
Just gave one last comment; otherwise I think it's fine, but I don't have a button to mark them as resolved. :-) |
Pretty simple package, with a silly name: Venv in Parent IPykernel.
Working with venv's and jupyter can be a bit awkward since you have to activate the venv, then run
python3 -m ipykernel install --user --name venvkernel-name
, then in all the notebooks select that kernel, then before you commit the notebook remember to change it back to the defaultpython3
as not everybody will have the same kernel/be using venvs.The standard
python3
kernel is just:Which launches ipykernel with the system
python3
. This package overwrites the default kernel with:Where the
vip_ipykernel_launcher
performs a search from the current directory up to the root directory, globbing for a.venv/bin/python3
orvenv/bin/python3
along the way.If it finds a match for a
python3
executable in avenv
directory, it then passes the subsequent arguments to it (i.e.-m ipykernel -f {connection_file}
), which in the end replicates the standard kernel launch process.Then you can install this kernel and launch a notebook in a project with a
.venv
in it, and that notebook will run with the correct python environment.Anybody up for reviewing this? @tmichela @takluyver @antarcticrainforest