Learn Python from Scratch: Installation and Configuration Guide 2026

Python is an interpreted, high-level, general-purpose programming language. This means it does not need to be compiled into machine language before being executed, which facilitates a rapid development cycle. Unlike languages such as Java or C++, an executable file is not generated; instead, the code is executed directly by the Python interpreter. It is cross-platform, allowing you to write code on one operating system (like Windows) and run it on another (like macOS or Linux) without modifications. Additionally, Python supports multiple programming paradigms, including object-oriented, procedural, and functional programming.

In this introductory guide, we will explore why Python has become such a popular choice for developers of all levels, its key features, advantages, and we will guide you through the installation and configuration process so you have everything ready to start programming.

The incredible growth of Python in recent years

Python has experienced exponential growth in the last decade, establishing itself as one of the most popular and in-demand programming languages in the world. As seen in various industry sources and analyses, its popularity continues to rise.

Python growth

Image via Stack Overflow

This growth is due to its simplicity, versatility, and the robust community that supports it. Learning Python is not only an investment in your professional development but also a gateway to a constantly expanding technological ecosystem.

Why Python?

Python for everything: web applications, desktop apps, data science, artificial intelligence, and more

Python's versatility is one of its greatest attractions. It is not limited to a single domain; you can use it for a wide range of applications:

  • Web Development: Frameworks like Django and Flask allow for building robust and scalable web applications quickly and efficiently.
  • Data Science and Machine Learning: With libraries like NumPy, Pandas, Scikit-learn, and TensorFlow, Python has become the de facto language for data analysis, visualization, and artificial intelligence.
  • Desktop Development: Tools like PyQt, Tkinter, and Kivy allow for creating cross-platform desktop applications with native user interfaces.
  • Automation and Scripting: Python is ideal for automating repetitive tasks, from file manipulation and web scraping to systems administration.

You can explore the vast number of web frameworks for Python here: Web Frameworks for Python

Cross-platform and a vast ecosystem of libraries

Python has an official package repository, PyPI (Python Package Index), with more than 127,000 libraries that you can use in your projects. This, combined with more than 600,000 repositories on GitHub, gives you access to an immense amount of reusable code for almost any task you can imagine.

Python is easy to learn

Python's syntax is clean, readable, and concise, making it an ideal language for beginners. Unlike other languages, it does not require complex syntax to perform simple tasks. Python uses indentation to define code blocks, which encourages clean and organized code from the start.

Furthermore, there is no need to explicitly declare variable types, which further simplifies the code-writing process, similar to how it works in JavaScript or PHP.

Installing Python on your PC

If you've made it this far, you're probably ready to install Python and start programming. Below, we show you how to do it on different operating systems.

You can download the latest version of Python from the official downloads page.

Download Python

On Windows

Download the executable installer (.exe) and run it. During installation, make sure to check the "Add Python to PATH" box. This will allow you to run Python from the command line in any directory. The installation is a simple "next, next, finish" process, unless you need a custom configuration.

Modifying our system's PATH environment variable

Optionally, if you didn't set the PATH, you must do it manually; similar to what we did with Java and Java_Home but for Python. This way, we can use Python from the Windows or Linux console without any problems, regardless of the path we are in.

To do this, go to the location where you installed Python and copy the installation path, which in my case is the following:

python installation path

For Windows, go to Equipo/Computer, locate "This PC" and then "Properties":

python installation path

And now click on "Advanced system settings":

advanced system settings

Then click on the environment variables button:

System Properties

Here a list will appear with some paths, and we are interested in modifying the Path variable:

Environment Variables

Select it, click on edit, and add our Path:

Python path route

With this, we have everything necessary to start working with Python as we will see in subsequent entries.

On macOS

macOS usually comes with a pre-installed version of Python, but it is generally an old version. It is recommended to install the latest version from the Python website or using a package manager like Homebrew (brew install python).

On Linux

Most Linux distributions also come with Python pre-installed. You can check the version with python3 --version. To install the latest version, you can use your distribution's package manager (for example, sudo apt-get install python3 on Debian/Ubuntu).

How to update Python

Video thumbnail

I'm going to show you how you can update your Python version. In my case, I had a fairly old one.

To find out which version you have installed, you can use python3 --version or simply python --version, depending on your operating system. Sometimes it responds with one, sometimes with the other —who knows why.

$ python -V

In my case, it returns this version: Python 3.9.6, and searching a bit on Google I discovered it was released in 2021. We are in 2025, so it is clearly outdated.

Why update?

Attempting to install Django, I encountered an error: I couldn't satisfy the minimum version required. The system forced me to use old versions of Django (like 4, 3, or 2), which doesn't work for me. That's why I absolutely needed to update.

How to update Python?

1. Download from the official page

First, go to the official page:

https://www.python.org

There you can download the latest version for your operating system.

2. Alternatives depending on the system
On Mac: you can directly use the installer or also tools like Homebrew.

On Linux: you can update Python through the corresponding package manager (apt, dnf, etc.).

On Windows: download the installer from python.org. During installation, make sure to check the option that says "Add Python to PATH". This allows you to use Python from the terminal (CMD or PowerShell) without complications.

Step-by-step installation

Once the installer is downloaded:

  1. Accept the licenses.
  2. Enter your password if you are on Mac.
  3. Wait... (it may take a while, so be patient).
  4. In my case, version 3.14.3 was installed, which is the latest available as of today.

Configuring the development environment

Once Python is installed, it is important to configure the PATH environment variable to be able to access the interpreter and other Python tools from anywhere on your system. If you checked the "Add Python to PATH" option during installation on Windows, this step is already done.

To verify that Python is correctly installed and configured, open a terminal or command line and type:

python --version

Or on some systems:

python3 --version

This should show the version of Python you just installed.

Virtual Environments: An Essential Best Practice

Before you start installing packages, it is fundamental that you learn to use virtual environments. A virtual environment is an isolated copy of Python, which allows you to have different versions of packages for different projects, avoiding dependency conflicts.

To create a virtual environment, navigate to your project folder and run:

python -m venv venv

This will create a folder named venv with the virtual environment. To activate it:

  • On Windows: venv\Scripts\activate
  • On macOS and Linux: source venv/bin/activate

Once activated, any package you install with pip will be installed in this environment, keeping your global Python installation clean.

PIP: The Python Package Manager

pip is the standard package manager for Python. It allows you to install and manage libraries and dependencies that are not part of the standard library.

To install a package, such as the popular web framework Django, simply run:

$ pip install django

Or for Flask:

$ pip install flask

To uninstall a package:

$ pip uninstall flask

Managing dependencies with requirements.txt

To ensure your project has the same dependencies in different environments (development, production, etc.), it is common practice to list all dependencies in a requirements.txt file.

You can generate this file with the following command, which saves all packages installed in the current environment:

$ pip freeze > requirements.txt

Then, in another environment, you can install all the project dependencies with a single command:

$ pip install -r requirements.txt

How to remove all packages installed by pip with a single command?

If you need to clean your virtual environment and start from scratch, you can uninstall all packages with this command:

pip freeze | xargs pip uninstall -y

This command is especially useful when you want to update all of a project's dependencies to their latest versions.

Solving common problems with pip

Sometimes, especially in new installations, you may encounter problems when trying to use pip from the command line.

1. Verify pip installation

First, make sure pip is available by running it as a Python module:

python -m pip --version

If this command works, pip is installed. If not, you may need to reinstall Python, ensuring that the option to install pip is selected.

2. Add pip to PATH

If the previous command works, but pip alone is not recognized, the problem is likely that the Python scripts directory is not in your PATH environment variable. The simplest solution is to reinstall Python and make sure to check the "Add Python to PATH" option.

Congratulations! Now you have everything you need to start your journey with Python. In the next entries, we will explore the basic concepts of the language, such as variables, data types, control structures, and much more.

Next step, take the first steps with Python.

Discover why Python is the ideal language to start programming with. Learn how to install it, configure your environment, and take your first steps in web development and data science.

I agree to receive announcements of interest about this Blog.

Andrés Cruz

ES En español