<?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 Busralasya on Medium]]></title>
        <description><![CDATA[Stories by Busralasya on Medium]]></description>
        <link>https://medium.com/@busralasya?source=rss-9b1246860464------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*h9zJy0_lYDTiKLT-RIMuxA.png</url>
            <title>Stories by Busralasya on Medium</title>
            <link>https://medium.com/@busralasya?source=rss-9b1246860464------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:20:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@busralasya/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[Data Science Tricks : What is this virtual environment ??]]></title>
            <link>https://medium.com/@busralasya/data-science-tricks-what-is-this-virtual-environment-76536344fccd?source=rss-9b1246860464------2</link>
            <guid isPermaLink="false">https://medium.com/p/76536344fccd</guid>
            <dc:creator><![CDATA[Busralasya]]></dc:creator>
            <pubDate>Thu, 09 Dec 2021 21:40:54 GMT</pubDate>
            <atom:updated>2021-12-10T10:11:45.456Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Data Science Tricks : What is this virtual environment ??</strong></h3><p>Hi guys 🤩 This is my first blog post I’ve ever written. I will share with you the virtual environment structure and some commands necessary to know.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j5Gfcc5lcKxmmiYJ" /><figcaption>Photo by <a href="https://unsplash.com/@jstrippa?utm_source=medium&amp;utm_medium=referral">James Harrison</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>📌 In first place, let’s talk about what a virtual environment means and for what purposes it is used. Virtual environment is a tool for creating an isolated environment for Python projects. It provides the opportunity to create different library and version needs for different projects in a way that does not affect each other.</p><p>I would like to continue with the example in order to revive it in the mind. We have two projects such as project A and project B. For both of these projects, we need to use different versions of the same library. For this reason, we cannot run both projects in the same library version.</p><p>That’s where the virtual environment comes in. 🧑‍🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kBjphWsIZvMFQQ7U0_1Qkw.png" /><figcaption>Thanks virtual environment 💘</figcaption></figure><p>Now that we understand why we are using it, you are ready to see more details.</p><blockquote><strong>What are the virtual environment tools ?</strong></blockquote><p><strong>1</strong> : venv</p><p><strong>2</strong> : virtualenv</p><p><strong>3</strong> : pipenv</p><p><strong>4</strong> : <strong>conda </strong>⚠</p><p>I want to focus on <em>CONDA</em>, because <em>CONDA</em> can do both package management and virtual environment management. You can see more details from this website. ➡ <a href="https://docs.conda.io/projects/conda/en/latest/commands.html#id1">Conda vs. pip vs. virtualenv commands</a></p><p><strong>WARNING</strong> | Before creating a virtual environment with conda, you need to download the conda. You can install from conda <a href="https://www.anaconda.com/products/individual"><strong>website</strong></a>.</p><p>It’s that simple. Now, let’s look at how the virtual environment is formed step by step. Then let’s show you the tips that will be useful to us in the environment together with the codes.</p><p><strong>ARE YOU READY ?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EfIbx8Hi-HWm7-ZqsgCgBA.png" /></figure><blockquote><strong><em>Package installation ( e.g. numpy ) :</em></strong></blockquote><p>Command : conda install numpy</p><blockquote><strong><em>Installing multiple packages at the same time :</em></strong></blockquote><p>Command : conda install numpy scipy pandas</p><blockquote><strong><em>Installing packages according to a specific version :</em></strong></blockquote><p>Command : conda install numpy=1.10</p><blockquote><strong><em>Removing packages :</em></strong></blockquote><p>Command : conda remove <strong>package_name ( ! </strong>here you will write the name of the package you want to delete )</p><blockquote><strong><em>Listing of installed packages :</em></strong></blockquote><p>Command : conda list</p><blockquote><strong><em>Upgrading packages :</em></strong></blockquote><p>Command : conda upgrade conda</p><blockquote><strong><em>Upgrading all packages :</em></strong></blockquote><p>Command : conda upgrade –all</p><blockquote><strong><em>Updating packages :</em></strong></blockquote><p>Command : conda update package_name</p><blockquote><strong><em>Updating all packages :</em></strong></blockquote><p>NOTE : Sometimes the difference update and upgrade can be confused. If you want, you can see more information from this <a href="https://stackoverflow.com/questions/29475138/what-is-the-difference-between-update-and-upgrade"><strong>website</strong></a>.</p><p>Command : conda update –all</p><blockquote><strong><em>Searching packages you want :</em></strong></blockquote><p>Command : conda search *search_term*</p><blockquote><strong><em>Listing virtual environments :</em></strong></blockquote><p>Command : conda env list</p><blockquote><strong><em>Creating a new virtual environment :</em></strong></blockquote><p>Command : conda create –n busra ( <strong>!</strong> here you can give your virtual environment the name you want. It can even be the name of your favorite pet 👻 )</p><blockquote><strong><em>Activating virtual environment :</em></strong></blockquote><p>Command : conda activate busra</p><blockquote><strong><em>Deactivating virtual environment :</em></strong></blockquote><p>Command : conda deactivate</p><blockquote><strong><em>Creating a virtual environment with a specific python version:</em></strong></blockquote><p>Command : conda create -n busra python=3</p><blockquote><strong><em>Creating a virtual environment with multiple packages at the same time :</em></strong></blockquote><p>Command : conda create -n mvk python=3 pandas numpy</p><blockquote><strong><em>List of packages in an inactive virtual environment:</em></strong></blockquote><p>Command : conda list -n myenv</p><blockquote><strong><em>Removing virtual environment :</em></strong></blockquote><p>Command : conda env remove -n env_name</p><blockquote><strong><em>Saving packages and versions as YAML files:</em></strong></blockquote><p>Command : conda env export &gt; environment.yaml</p><blockquote><strong><em>Reading the YAML file:</em></strong></blockquote><p>Command : conda env create -f environment.yaml</p><p>I have come to the end of the virtual environment topic. I hope I have gave useful information for you. See you in another <strong>Data Science Trick Series</strong>. Take good care of yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M0ECerj1c5JQdwNT" /><figcaption>Photo by <a href="https://unsplash.com/@jupp?utm_source=medium&amp;utm_medium=referral">Jonathan Kemper</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong><em>Resources :</em></strong></blockquote><p><a href="https://www.veribilimiokulu.com/python-virtual-environment-nedir/">Veri Bilimi Okulu</a></p><p><a href="https://realpython.com/python-virtual-environments-a-primer/">Python Virtual Environments: A Primer — Real Python</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76536344fccd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>