How to Install Esptool on Windows 10

This article on how to install Esptool on Windows 10 was written because I remembered that I had been for a time wondering how to do it. If you’re a Windows user, you’re probably used to graphical interfaces. You’re also used to easy installs – download an installer file, run or open the file, follow the installation instructions, and it’s done.

Installing Esptool is a two-part process. First you download and install Python. Then, you run a Python command to install Esptool.

pip install esptool

Esptool runs on the scripting and programming language Python. Therefore, we need to install Python first before we install Esptool.

How to Install Python

On Windows 10, you may simply type “python” on the Windows search box beside the Windows Start button and download Python from the Windows App Store. An issue with this procedure is that you may get an older version of Esptool from the App Store.

Picture of Python download page from Windows App Store, the first step in installing Esptool on Windows 10

If you want to get the latest version of Python, downloading the installer from the Esptool download page is the way to go.

Screenshot of download page of Python where a newer version is available for download

Run the downloaded Esptool installation file. As of this writing, the installation file for the latest version is python-3.8.1.

You may want to put a check mark on the Add Python 3.8 to PATH before clicking on the Install Now button. This will make it easier to start the Python and the Esptool program. Without the check mark, before you can run Python or Esptool, you would need to find the directory where you installed Python. You then would have to change your current directory to the Python’s folder.

Image of the Python 3.8.1 installer showing annotation for the Add Python 3.8 to PATH

How to Install Esptool

After successfully installing Python, open a command prompt window.

Type cmd on the Windows search box and click on the Command Prompt app. Then type the command pip install esptool.

pip install esptool
Screenshot of the Windows command prompt showing the command used for installing Esptool on Windows 10

A successful Esptool installation will look like the screenshot below.

A screen grab of the output on command prompt after running the esptool installer and showing the successful installation of Esptool on Windows 10

Testing the Esptool Installation

A quick test of the Esptool installation can be done by issuing the command esptool.py version.

esptool.py version
A screenshot of the command prompt for testing if the Esptool was indeed successfully installed on Windows 10

Congratulations! You now have Esptool installed and ready for use on your ESP8266 or ESP32 development board.

Examples of Possible Uses

esptool.py chip_id
esptool.py flash_id
esptool.py read_flash 0 0x400000 firmware_backup.bin

Related Articles on How to Install Esptool on Windows 10

How to Install Arduino IDE on Windows 10
How to Set up Arduino IDE for ESP8266 Programming
How to Test NodeMCU V3 Using Esptool
NodeMCU V3 ESP8266 Pinout and Configuration
NodeMCU ESP-32S Pin Configuration

References on How to Install Esptool on Windows 10

Esptool Wiki on Github
Python on Wikipedia
Python Website

1 thought on “How to Install Esptool on Windows 10”

  1. I have just tried this but I get an error when installing esptool.
    Thie is the error:

    C:\Users\tehud>pip install esptool
    Collecting esptool
    Using cached esptool-3.0.tar.gz (149 kB)
    Collecting bitstring>=3.1.6
    Using cached bitstring-3.1.7.tar.gz (195 kB)
    Collecting cryptography>=2.1.4
    Using cached cryptography-3.3.1-cp36-abi3-win_amd64.whl (1.5 MB)
    Collecting ecdsa>=0.16.0
    Using cached ecdsa-0.16.1-py2.py3-none-any.whl (104 kB)
    Collecting pyserial>=3.0
    Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
    Collecting reedsolo=1.5.3
    Using cached reedsolo-1.5.4.tar.gz (271 kB)
    Collecting six>=1.4.1
    Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
    Collecting cffi>=1.12
    Using cached cffi-1.14.4-cp39-cp39-win_amd64.whl (179 kB)
    Collecting pycparser
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
    Using legacy ‘setup.py install’ for esptool, since package ‘wheel’ is not installed.
    Using legacy ‘setup.py install’ for bitstring, since package ‘wheel’ is not installed.
    Using legacy ‘setup.py install’ for reedsolo, since package ‘wheel’ is not installed.
    Installing collected packages: bitstring, six, pycparser, cffi, cryptography, ecdsa, pyserial, reedsolo, esptool
    Running setup.py install for bitstring … error
    ERROR: Command errored out with exit status 1:
    command: ‘c:\python39\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\tehud\\AppData\\Local\\Temp\\pip-install-kd3p44fh\\bitstring\\setup.py'”‘”‘; __file__='”‘”‘C:\\Users\\tehud\\AppData\\Local\\Temp\\pip-install-kd3p44fh\\bitstring\\setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ install –record ‘C:\Users\tehud\AppData\Local\Temp\pip-record-jnwv7913\install-record.txt’ –single-version-externally-managed –compile –install-headers ‘c:\python39\Include\bitstring’
    cwd: C:\Users\tehud\AppData\Local\Temp\pip-install-kd3p44fh\bitstring\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib
    copying bitstring.py -> build\lib
    running install_lib
    byte-compiling c:\python39\Lib\site-packages\bitstring.py to bitstring.cpython-39.pyc
    error: [Errno 13] Permission denied: ‘c:\\python39\\Lib\\site-packages\\__pycache__\\bitstring.cpython-39.pyc.1892349097392’
    —————————————-
    ERROR: Command errored out with exit status 1: ‘c:\python39\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\tehud\\AppData\\Local\\Temp\\pip-install-kd3p44fh\\bitstring\\setup.py'”‘”‘; __file__='”‘”‘C:\\Users\\tehud\\AppData\\Local\\Temp\\pip-install-kd3p44fh\\bitstring\\setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ install –record ‘C:\Users\tehud\AppData\Local\Temp\pip-record-jnwv7913\install-record.txt’ –single-version-externally-managed –compile –install-headers ‘c:\python39\Include\bitstring’ Check the logs for full command output.
    WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
    You should consider upgrading via the ‘c:\python39\python.exe -m pip install –upgrade pip’ command.
    Any idea why it is erroring? I’m not very conversant with low level programming or Python.

Leave a Reply

Your email address will not be published. Required fields are marked *