I'm Alex Kearney, a PhD student studying Computer Science at the University of Alberta. I focus on Artificial Intelligence and Epistemology.

I recently tried using ipython notebook in a pipenv shell and realized that all of my imports were missing. This is because the the kernel selected is wrong.

In your project directory run:

pipenv install ipykernel
pipenv shell

When you start your pipenv, you'll see a shell name in your terminal like (my-virtualenv-name) bash-4.4$. You need to add that to the kernel list in jupyter notebook. Do that by running:

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

Restart your jupyter and go to your notebook. In the Kernel>Change Kernel menu, you should now see your pipenv in the list under my-virtualenv-name.

Select that and you're good to go!