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.
🔧 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”
Adding Python to the PATH allows you to use the python and pip commands in the Command Prompt.
4. Verify Python Installation
Open Command Prompt and run:
python --versionor
python -V✅ Example output:
Python 3.13.55. Verify pip Installation
Run the following command to verify pip:
pip --versionor
pip -V✅ Example output:
pip 25.0.16. Update pip (Recommended)
To upgrade pip to the latest version:
python -m pip install --upgrade pip7. Fix: Python or pip Not Recognized
If you encounter errors such as:
'pip' is not recognized as an internal or external commandor
Python was not foundIt 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.
Was this guide helpful? Let us know in the comments and share it with others getting started with ESP8266 and ESP32!