<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Patricia Escalera on Medium]]></title>
        <description><![CDATA[Stories by Patricia Escalera on Medium]]></description>
        <link>https://medium.com/@patty.escalera?source=rss-a92f1d8f97fa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*D2na8rEL5VT1IaqB.</url>
            <title>Stories by Patricia Escalera on Medium</title>
            <link>https://medium.com/@patty.escalera?source=rss-a92f1d8f97fa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:03:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@patty.escalera/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Install Jupyter Lab and setup a conda environment]]></title>
            <link>https://medium.com/@patty.escalera/install-jupyter-lab-and-setup-a-conda-environment-54052443790b?source=rss-a92f1d8f97fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/54052443790b</guid>
            <category><![CDATA[setup-guide]]></category>
            <category><![CDATA[conda-environment]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Patricia Escalera]]></dc:creator>
            <pubDate>Fri, 24 May 2024 17:05:37 GMT</pubDate>
            <atom:updated>2024-05-24T17:05:37.895Z</atom:updated>
            <content:encoded><![CDATA[<h4>Install a kernel in a conda environment for your Data Science Project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bVUWGMz2CCDO5_5w" /><figcaption>Photo by <a href="https://unsplash.com/@setyaki?utm_source=medium&amp;utm_medium=referral">Irham Setyaki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Are you working on a Data Science project and relying on Google Colab notebooks, where all necessary packages are readily available? While Colab is convenient, having a local development environment on your PC can offer greater flexibility and control. In this article, I’ll guide you through the process of setting up Jupyter Lab on your computer, creating and managing conda environments, and configuring Jupyter Lab to utilize these environments. We’ll also explore the concept of Jupyter kernel and their role within your conda environment.</p><h4>What is a kernel in Jupyter?</h4><blockquote>Kernels are programming language specific processes that run independently and interact with the Jupyter Applications and their user interfaces. <a href="https://github.com/ipython/ipykernel">ipykernel</a> is the reference Jupyter kernel built on top of <a href="https://ipython.org/">IPython</a>, providing a powerful environment for interactive computing in Python.</blockquote><p>Well, translated to more comprehensible words:</p><p>A kernel is the<strong> component</strong> of Jupyter Lab that runs your code. Think of it like a car’s <strong>engine</strong>, working under the hood to ensure your code executes correctly. Different kernels can run various types of code, such as Python, Julia, or R. Conda environments help manage these different kernels by creating isolated environments for each, ensuring they operate smoothly and without interference.</p><p>These steps are applicable for PCs running Linux Ubuntu, version 20.04 or higher.</p><h4>Create a conda environment</h4><p>Create two conda environments, one for our Jupyter Lab and the other for your project packages (ex. pandas, numpy, etc.)</p><ol><li>Open a terminal window and download <em>Miniconda, </em>then<em> </em>run the installation script below (ref. Anaconda documentation <a href="https://docs.anaconda.com/free/miniconda/">page</a>)</li></ol><pre>mkdir -p ~/miniconda3<br>wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh<br>bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3<br>rm -rf ~/miniconda3/miniconda.sh</pre><p>2. Keep open the terminal window and create a conda development environment<em> </em>where we install Jupyter lab</p><pre>$ conda create --name newdevenv jupyterlab<br></pre><p>Create the 2nd environment for your project with some packages, ex. pandas and numpy</p><pre>$ conda create --name dataproject-env python pandas numpy<br></pre><h4>Install ipykernel (python kernel) in your project environment</h4><pre>$ conda activate dataproject-dev<br>(dataproject-dev) $ conda install ipykernel<br>(dataproject-dev) $ python -m ipykernel install --user --name dataproject-kernel --display<br>-name &quot;Python (dataproject env)&quot;</pre><p>with the — display “Python (dataproject env)” We define how Jupyter Lab will display the environment name.</p><p>📚 <strong>Resources: </strong><a href="https://stackoverflow.com/questions/53004311/how-to-add-conda-environment-to-jupyter-lab">How to add conda environment to Jupyter lab</a></p><p><a href="https://ipython.readthedocs.io/en/latest/install/kernel_install.html#kernels-for-python-2-and-3">Installing the IPython kernel - IPython 8.25.0.dev documentation</a></p><h4>Run Jupyter Lab</h4><pre>$ conda activate newdevenv<br>(newdevenv) $ jupyter lab</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NwxU5M6oJRue45i20NQsMg.png" /></figure><h4>Create a notebook</h4><p>Click on “Python (dataproject env)” to create a new notebook. This notebook will run in the specified environment, which includes pandas and numpy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAkAhx-AOqIs6t89NE6xDA.png" /><figcaption>Notebook that runs in dataproject-env environment</figcaption></figure><p>You can create as many kernels as you need and easily switch between them. To change the kernel executing your code, simply click on the current kernel name displayed in the upper right corner of your notebook and select a different one from the list.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54052443790b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>