DEV Community

vivek atwal
vivek atwal

Posted on

3 2

Enabling virtualenv on jupyter notebook

Introduction

Jupyter notebook make life easier for

  • Begineer to learn and understand step by step
  • Experts to explore data,visualiations.
  • Mentors to create course
  • Speakers for demonstration

While exploring same libraries have different versions and you need to test those version separately. They can be installed on separate virtualenvs.

Now in order to make this environment quickly accessible, we need to add this env to jupyter notebook as kernels.

Below are the steps:

Jupyter

Installation

sudo apt install jupyter-core
Enter fullscreen mode Exit fullscreen mode

Activate the env and the install ipykernel

pip install ipykernel
Enter fullscreen mode Exit fullscreen mode

Inorder to differentiate different environemnt, you have to name them, Name them with along with packgae version

ipython kernel install --user --name=envname_pkg_v1
Enter fullscreen mode Exit fullscreen mode

To view all the environment

jupyter kernelspec list
Enter fullscreen mode Exit fullscreen mode

Remove environment from jupyter

jupyter kernelspec uninstall envname
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (2)

Collapse
 
edublancas profile image
Eduardo Blancas

great resource for people getting started with Jupyter, thanks for sharing! I'm part of a growing community of jupyter users, it'd be great if you join!

Collapse
 
vivekatwal profile image
vivek atwal

Thanks for reaching out, I am glad you like it

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay