Using Jupyter Notebook in Virtual Environment Last Updated : 14 Sep, 2021 Comments Improve Suggest changes Like Article Like Report In this article, we are going to see how to set Virtual Environment in Jupyter. Sometimes we want to use the Jupyter notebook in a virtual environment so that only selected packages are available in the scope of the notebook. To do this we have to add a new kernel for the virtual environment in the list of kernels available for the Jupyter notebook. Let's see how to do that: Step 1: Create a virtual environment Open the directory where you want to create your project. open cmd/powershell and navigate to the same directory and run the following commands to create a virtual environment. python -m venv venv Step 2: Activate the virtual environment Now as we have our virtual environment let's activate it. venv\Scripts\activate Step 3: Install jupyter kernel for the virtual environment using the following command: Running the following command will create a kernel that can be used to run jupyter notebook commands inside the virtual environment. ipython kernel install --user --name=venv Step 4: Select the installed kernel when you want to use jupyter notebook in this virtual environment Let's now check if our kernel is created. Just run "jupyter notebook" command in the command prompt or Powershell and the jupyter environment will open up. Click on the kernel and click change kernel you will be able to see the kernel you just created. You can see now you have the kernel in the list of kernels and now you can have separate dependencies for the jupyter notebook and be more organized. After you are done with the project and no longer need the kernel you can uninstall it by running the following code: jupyter-kernelspec uninstall venv Comment More infoAdvertise with us Next Article Using Jupyter Notebook in Virtual Environment R rupeshdharme200001 Follow Improve Article Tags : Python Jupyter-notebook Practice Tags : python Similar Reads Jupyter Notebook Extension in Visual Studio Code In this article, we will see how to use Jupyter Notebook in Visual Studio code. Jupyter Notebook has grown into a popular IDE choice. With the availability of additional kernels in addition to IPython, Jupyter Notebooks can also support Java, R, Julia and other popular programming languages ââbeside 4 min read How to setup Conda environment with Jupyter Notebook ? Anaconda is open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder 2 min read Create virtual environment in Python A Python virtual environment is like a personal workspace for your project. It lets you create a separate space where you can install and manage packages without affecting other Python projects on your system. This is especially useful when you're working on multiple projects with different dependen 4 min read Using mkvirtualenv to create new Virtual Environment - Python Virtual Environment are used If you already have a python version installed and you want to use a different version for a project without bothering the older ones. it is good practice to use a new virtual environment for different projects. There are multiple ways of creating that, today we will cre 2 min read Managing Virtual environments in Python Poetry Poetry helps you declare, manage, and install dependencies of Python projects, ensuring you have the right stack everywhere. Poetry is a tool for dependency management and packaging in the PHP programming language that helps in managing project dependencies and creating virtual environments. Unlike 4 min read Like