Skip to content

Instantly share code, notes, and snippets.

@adammarples
Created February 28, 2018 16:54
Show Gist options
  • Save adammarples/a9a7c3314c3a4dc54bc7bafd73b25990 to your computer and use it in GitHub Desktop.
Save adammarples/a9a7c3314c3a4dc54bc7bafd73b25990 to your computer and use it in GitHub Desktop.
A fish function to create a pipenv which will be made available as a jupyter notebook kernel
function notebookpipenv
set d (basename (pwd))
pipenv install ipykernel $argv[1..-1]
pipenv run python -m ipykernel install --user --name=$d
end
@adammarples
Copy link
Author

The kernel will be named after whatever dir you are in when you create it and can be passed args which will install with pip

$/myproject > notebookpipenv pandas

creates a pipenv virtualenv called myproject with pandas installed available in notebook > kernel > change kernel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment