Pipenv Shells and Jupyter Notebook

Just finished this video: https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-modules/videos/learn-python3-pipenv

Do the pipenv shells work with Jupyter Notebook? Or if you are using Jupyter Notebook does it require a different method of dependency control?

Yes. You don’t even have to open the shell if you don’t want to. Just create your pipenv environment and then use pipenv install jupyter to install it and pipenv run jupyter notebook to open it.

No, but you can use a different one.

Choosing which package management/dependency control method is largely subjective, so I suggest you use whatever you are most comfortable with until you need to learn a new one.

When I’m doing data science projects I typically use conda environments, so for jupyter notebooks I almost always use those.

For other python work I use both pipenv and the built-in venv with pip extensively. Could you use these for data science work? Totally. And if you need to collaborate with engineers, they’ll probably use one of those, so it’s good to know them. However, engineers rarely ever use notebooks, so take from that what you will.

There’s also poetry, which is supposed to be awesome, but I haven’t had a reason to try it out yet.

My mental checklist looks something like this:

  • Need jupyter?
    use conda

  • Doing data science-y stuff?
    use conda

  • Everything else:
    use venv/pip or pipenv depending on project