Is there a way to use pipenv with Jupyter notebook? Is there a way to use pipenv with Jupyter notebook? python python

Is there a way to use pipenv with Jupyter notebook?


Just tried the following with success.

In your project folder:

pipenv install ipykernelpipenv shell

This will bring up a terminal in your virtualenv like this:

(my-virtualenv-name) bash-4.4$

In that shell do:

python -m ipykernel install --user --name=my-virtualenv-name

Launch jupyter notebook:

jupyter notebook

In your notebook, Kernel -> Change Kernel. Your kernel should now be an option.

Change Kernel Screenshot

Source: IPythonNotebookVirtualenvs


Install and start jupyter inside pipenv:

pipenv install jupyterpipenv run jupyter notebook

Any other packages that are installed via pipenv (e.g. pipenv install numpy) will also be available to your jupyter notebook session.


Luis' answer works perfectly for jupyter notebooks.

But for hydrogen/atom specifically the recipe is:

pipenv install ipykernelpipenv shell

launch atom from within the pipenv shell

> atom

Should be good to go!