
Installing Python is a straightforward process, but there are a few important tips to ensure compatibility with esptool and Thonny IDE, especially when working with ESP8266 and ESP32 microcontrollers.
In this tutorial, we’ll walk you through the correct way to install Python on Windows and configure it for MicroPython development.
📺 Watch the Video Tutorial
For a full step-by-step guide, check out this YouTube video on how to install Python for ESP8266 and ESP32:
👉 Watch on YouTube : How to Install Python for ESP8266 and ESP32🔧 Steps to Download and Install Python on Windows
1. Download the Python Installer
Go to the official Python website and download the latest version for Windows:
➡️ https://www.python.org/downloads/windows/2. Run the Installer
Double-click the downloaded.exe
file to start the installation.
3. Important: Check These Two Boxes
On the first screen of the installer, make sure to check the following options before clicking “Install Now”:- ✅ “Use admin privileges when installing py.exe”
- ✅ “Add python.exe to PATH”
python
and pip
commands in the Command Prompt.
💡 Tip: If you forgot to check the “Add Python to PATH” option, you can add it manually (explained below).
4. Verify Python Installation
Open Command Prompt and run:python --version
or
python -V
✅ Example output:
Python 3.13.5
5. Verify pip Installation
Run the following command to verify pip:pip --version
or
pip -V
✅ Example output:
pip 25.0.1
6. Update pip (Recommended)
To upgrade pip to the latest version:python -m pip install --upgrade pip
7. Fix: Python or pip Not Recognized
If you encounter errors such as:'pip' is not recognized as an internal or external command
or
Python was not found
It means the PATH variable is missing or incorrect. Here’s how to fix it:
How to Add Python and pip to PATH Manually:
- Right-click This PC or Computer and select Properties.
- Click Advanced system settings.
- Go to the Advanced tab and click Environment Variables.
- Under System variables, double-click Path.
- Click New and add the following paths (replace
{UserName}
and Python version):
C:\Users\{UserName}\AppData\Local\Programs\Python\Python313\
C:\Users\{UserName}\AppData\Local\Programs\Python\Python313\Scripts\
Click OK to save and close all windows.
✅ Final Words
After completing these steps, Python will be fully installed and ready for use with Thonny IDE and esptool in your ESP8266 or ESP32 projects.
If you’re new to MicroPython development, this is a crucial first step to get started with IoT programming. 📺 Don’t forget to watch the full video tutorial here: 👉 Watch Python Installation Tutorial on YouTube Was this guide helpful? Let us know in the comments and share it with others getting started with ESP8266 and ESP32!