Getting Started with Python: What is the best way to install Python
MY LEARNING JOURNEY · 02
Learning Python with Chai aur Code, one video at a time.
Learning source: Watch Video 2 — Chai aur Code
Before coding our first program in Python, we must ask ourselves some more fundamental questions: how can we install Python, and where can we execute our code?
In this video, I learned how to install Python on our computer, explored online alternatives, and got introduced to tools like Google Colab, Anaconda, Miniconda, and conda.
Let's break down what I understood.
1. Installing Python + VS Code
The recommended approach is to install Python on our computer using the official Python website.
Installing Python locally gives us more control over our development environment. We can work with files on our computer, install packages, and build projects without depending entirely on an online coding platform.
On Windows, the installer is generally a .exe file. Windows also provides the Python launcher (py) in many installations.
On macOS, the official installer is generally a .pkg file, and we commonly use the python3 command to run Python 3.
For example, depending on the operating system and installation, we might run Python using:
python --version
or:
python3 --version
The command that works depends on how Python is installed and configured.
Although online environments are convenient, installing Python locally helps us work in a more complete development environment and avoid certain limitations we might encounter online. However, a local installation can also have setup issues, so it is important to understand how our environment works.
2. What If I Don't Want to Install Python?
If we don't want to install Python immediately, there are other tools that allow us to write and run code through a browser.
Let's look at the alternatives I learned about.
A. OnlineGDB
OnlineGDB is a browser-based coding environment that allows us to write, execute, and debug programs in several programming languages, including Python.
We can use it to practise coding without setting up a complete local development environment.
It is useful when we want to:
Try small code examples.
Practise programming exercises.
Test our understanding of a concept quickly.
Debug simple programs.
OnlineGDB is an example of an online IDE (Integrated Development Environment). An IDE brings together tools that help us write, run, and debug code.
Online coding editors are convenient because we can start coding directly in our browser. However, they may have limitations when we move towards larger projects or need a specialized development environment.
B. Google Colab
Google Colab is another browser-based environment for writing and running Python code. However, it is particularly useful for data science, machine learning, and working with data.
One of its main advantages is that it provides a cloud-based environment with many commonly used libraries already available. This means we often don't need to spend time installing and configuring every library ourselves.
This is especially helpful when working with data analysis, graphs, visualizations, and machine learning experiments.
Since the code runs in a cloud environment, we need a reliable internet connection. The available computing resources also depend on the environment and access level.
What Is a Notebook?
While exploring Google Colab, I learned about notebooks.
A notebook is a document made up of individual sections called cells. These cells can contain different types of content, such as:
Code
Text and notes
Images
Data and tables
Graphs and visualizations
Outputs generated by running code
Unlike a traditional Python script, where we commonly execute the file as a whole, a notebook allows us to run individual cells and see their outputs.
For example, we could use one cell to load a dataset, another to analyse it, and another to create a graph.
This makes notebooks particularly useful for data science because we can experiment with code step by step and immediately inspect the results.
OnlineGDB vs Google Colab
Although both allow us to write Python code through a browser, their main uses are different.
| Feature | OnlineGDB | Google Colab |
|---|---|---|
| Main purpose | General coding practice | Data science and experimentation |
| Working style | Code editor | Notebook with cells |
| Outputs | Program output and debugging | Code output, data, graphs, and more |
| Best suited for | Small programs and exercises | Data analysis, visualization, and ML experiments |
Neither tool is universally better. The right choice depends on what we want to accomplish.
3. Anaconda and Miniconda
The next tools I learned about were Anaconda and Miniconda.
Both are related to Python package and environment management, but they differ in what they include when installed.
A. Anaconda
Anaconda is a Python distribution designed mainly for data science and scientific computing.
It comes with Python, conda, and a collection of commonly used packages and tools.
These packages support tasks such as:
Artificial intelligence and machine learning
Data analysis and exploration
Data visualization
Scientific computing
Data transformation
The main advantage is convenience. Many useful packages and tools are included, so we can start working without installing everything separately.
However, because it includes a large collection of packages, the installation requires more disk space.
B. Miniconda
Miniconda is a smaller, minimal installer for working with Python and conda.
Instead of installing a large collection of packages upfront, it provides the essentials, including conda and a Python installation, so we can install the additional packages we need later.
This gives us more control over our environment and avoids installing a large number of packages that we might never use.
Anaconda vs Miniconda
| Feature | Anaconda | Miniconda |
|---|---|---|
| Installation size | Larger | Smaller |
| Included packages | Many packages included | Minimal setup |
| Flexibility | Convenient to start with | More control over what to install |
| Best suited for | Those who want many tools ready to use | Those who prefer a lightweight setup |
Neither option is automatically better. Anaconda can be convenient if we want many data science tools ready to use, while Miniconda is useful if we prefer to install only what we need.
4. So, What Exactly Is Conda?
This was another concept I wanted to understand clearly.
Conda is a package and environment manager. It helps us install and manage packages, handle dependencies, and create isolated environments for different projects.
Let's understand these two main uses.
Package Management
A package is reusable software that we can use in our programs.
For example, NumPy and pandas are Python libraries that provide functionality for numerical calculations and data analysis.
Instead of implementing everything ourselves, we can install and use these libraries in our projects.
Conda helps us install packages and manage their dependencies.
Environment Management
Imagine that we're working on two different projects.
Project A requires one version of a library, while Project B requires another version. Installing everything into a single shared environment could lead to dependency conflicts.
Conda allows us to create separate environments for these projects, each with its own packages and configurations.
This helps keep projects organized and reduces the chance of dependencies interfering with one another.
One important distinction: Anaconda and Miniconda are distributions or installers, whereas conda is the tool used to manage packages and environments.
They're related, but they aren't the same thing.
5. My Key Takeaways
Here's what I took away from this video:
We can install Python locally to get more control over our development environment.
Online alternatives like OnlineGDB allow us to write and run code without setting up Python locally.
Google Colab is especially useful for data science because it supports notebook-based coding and provides a cloud environment with commonly used libraries.
A notebook contains cells that can hold code, notes, and outputs, and we can execute individual cells.
Anaconda includes a broad collection of packages, whereas Miniconda provides a more minimal starting point.
Conda helps us manage packages, dependencies, and isolated environments for Python projects.
Final Thoughts
Before this video, I thought getting started with Python was mainly about installing it and writing code. Now I understand that there are different tools and environments available, depending on what we want to do.
For someone just starting out, knowing these options is useful. We can install Python locally for general development, use an online editor for quick experiments, or explore specialized tools like Google Colab when working with data.
I still have a lot to learn, but understanding the available tools gives me a clearer starting point.
This is just the beginning of my Python learning journey!
This is part of my learning-in-public series, where I document what I understand from each Chai aur Code Python lecture.
Have any tips for someone just starting with Python? I'd love to hear your suggestions in the comments. I'm still learning, and recommendations that can make my learning process more effective are always welcome.
About the author
- As a newbie, learning Python, bit by bit and error by error. I write about the things I learn, the queries I have and things I finally understand. If you’re learning as well, let’s do this together!
Comments
Join the discussionNo comments yet. Be the first to comment.
Python Learning Journey
I'm documenting my journey of learning Python through Chai aur Code, one video at a time. I'll share what I understand, the questions I encounter, the concepts I explore with AI, and the code I experiment with along the way. My goal is to learn by questioning, explaining concepts in my own words, and sharing the journey publicly. I'm a beginner, and I'm always open to suggestions that can help me learn better.


