
To quickly create an environment using conda, you can type in the command: conda create -name your_env_name python=3.7 -y For reference, I run my commands on the Terminal on Mac OS X. This guide will presume that you already have Anaconda or miniconda installed all the instructions will also be on the bash command line. There are some arguments as to why you should choose conda over virtualenv as outlined in Myth #5 in this blog post, but I’ll just focus on how to use conda in this guide since that’s a popular tool for data science, which is what I’m focused on right now. There are multiple ways of creating an environment, including using virtualenv, venv (built in to the Python 3 standard library), and conda, the package manager associated with Anaconda. Additionally, package managers for other languages, like JavaScript’s NPM ( Node Package Manager), take care of most of these details for you, but you’ll have to get your hands dirty in Python and deal with the environments yourself. For those more familiar with programming, virtual environments are analogous to Docker containers. Virtual environments keep these dependencies in separate “sandboxes” so you can switch between both applications easily and get them running. This is where virtual environments become useful. If I try running both at once on Python 2 or Python 3, one of them may break because some of the code that runs on Python 2 doesn’t run on Python 3 or vice versa. But we may have many projects on our computer, perhaps a Flask app that runs on version 0.11 (the first one you made!) and Python 2.7 and even a more modern Flask app that runs on version 0.12 and Python 3.4. Likewise, we may need to use specific versions of the libraries for similar reasons.


And sometimes when we create software, the software needs to run on a specific version of the language because our software expects a certain behavior that is present in older versions but changes in newer versions. Python, like many other programming languages, has different versions.
