# Installing MicroPython on ESP32

**URL:** <https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239>\
**Category:** Nano ESP32\
**Created:** [September 23, 2023, 2:05am UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239 "2023-09-23T02:05:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rebeccajoy](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@rebeccajoy](https://forum.arduino.cc/u/rebeccajoy)\
**Post date:** [September 23, 2023, 2:05am UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/1 "2023-09-23T02:05:15Z")

</div>

Hii!!

I have a new Nano ESP32, and I'm trying to install MicroPython via the installation executable. The utility seems to locate my board okay, but whenever I click the Install button, I get the following error messages:

Error running dfu-util: 'Command failed: "C:\Users\MsReb\AppData\Local\MicroPythonInstaller\app-1.2.1\resources\app\node\_modules\firmware-flash\bin\win32\ia32\dfu-util.exe" -a 0 -d 0x2341:0x0070 -D "C:\Users\MsReb\AppData\Local\Temp\ARDUINO\_NANO\_ESP32-20230914-unstable-v1.20.0-475-g174bb28d8.app-bin" -Q

Any idea what to do with this? I'd appreciate any input. Thanks!!

---

<div class="post-metadata">

**Author:** ![sbhklr](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sbhklr/32/287585_2.png) [@sbhklr](https://forum.arduino.cc/u/sbhklr)\
**Post date:** [September 28, 2023, 8:55am UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/2 "2023-09-28T08:55:49Z")

</div>

Hi @rebeccajoy !  
May I ask, have you uploaded successfully any Arduino sketch before that? Please try to upload a blink sketch via Arduino IDE and let me know if that works. Thing is, behind the scenes it uses the same tools to flash the firmware.  
In any case, could you please install the latest version of the tool and launch it from the command line ( **PowerShell** ) using:  
`micropython-installer.exe | echo`  
and provide the full log output? More information on that here: [GitHub - arduino/lab-micropython-installer](https://github.com/arduino/lab-micropython-installer#-reporting-issues)  
Thanks!

---

<div class="post-metadata">

**Author:** ![felipenmartins](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@felipenmartins](https://forum.arduino.cc/u/felipenmartins)\
**Post date:** [October 9, 2023, 3:13pm UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/3 "2023-10-09T15:13:59Z")

</div>

Hi, @sbhklr.

I am having the exact same issue with my new Nano ESP32: when running the MicroPython Installer, I also get an error message similar as the one above (Error running dfu-util) - except the paths are different. I get the same error message regardless if I open the MicroPython Installer from Windows Explorer or from PowerShell, running as administrator or not.

Following your suggestion, I tried to load the Blink sketch into the Nano ESP32 using the Arduino IDE 2.2.1: it also fails with the following error message:

```arduino
Cannot open DFU device 2341:0070 found on devnum 6 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
Failed uploading: uploading error: exit status 74

```

Finally, the output of micropython-installer.exe | echo is:

```arduino
> .\micropython-installer.exe | echo

feedURL https://update.electronjs.org/arduino/lab-micropython-installer/win32-x64/1.2.1
requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (win32: x64)' }
checking-for-update
update-not-available
≡ƒöì Finding latest firmware for board 'ARDUINO_NANO_ESP32' ...
≡ƒöù Firmware URL: https://downloads.arduino.cc/micropython/ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin
≡ƒîÉ Downloading firmware ...
≡ƒæÇ Device found: Nano ESP32 at COM13
≡ƒæì Device is already in bootloader mode.
≡ƒöÑ Flashing firmware 'ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin' ...
Command failed: "C:\Users\nasf\AppData\Local\MicroPythonInstaller\app-1.2.1\resources\app\node_modules\firmware-flash\bin\win32\ia32\dfu-util.exe" -a 0 -d 0x2341:0x0070 -D "C:\Users\nasf\AppData\Local\Temp\ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin" -Q
Cannot open DFU device 2341:0070 found on devnum 6 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available

Error running dfu-util: 'Command failed: "C:\Users\nasf\AppData\Local\MicroPythonInstaller\app-1.2.1\resources\app\node_modules\firmware-flash\bin\win32\ia32\dfu-util.exe" -a 0 -d 0x2341:0x0070 -D "C:\Users\nasf\AppData\Local\Temp\ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin" -Q
Cannot open DFU device 2341:0070 found on devnum 6 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
'

```

Additional info:  
I am running Windows 10 Enterprise on an HP Elitebook (Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz 1.80 GHz, 8,00 GB). Arduino IDE 2.2.1 works fine in this computer with all my other Arduino boards, including the new Arduino Uno R4 WiFi.

Any idea on how to fix this?  
Thanks!

---

<div class="post-metadata">

**Author:** ![felipenmartins](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@felipenmartins](https://forum.arduino.cc/u/felipenmartins)\
**Post date:** [October 13, 2023, 6:14pm UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/4 "2023-10-13T18:14:59Z")

</div>

**UPDATE:**

Using the Arduino IDE 2, I installed the board Arduino Nano ESP32 (I should have done that before 🙄). During this installation, the missing driver is installed. After that, I was able to install MicroPython using the MicroPython Installer and run Python code using the Arduino Lab for MicroPython.

Problem solved!

---

<div class="post-metadata">

**Author:** ![lburelli](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lburelli/32/989898_2.png) [@lburelli](https://forum.arduino.cc/u/lburelli)\
**Post date:** [October 13, 2023, 8:26pm UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/5 "2023-10-13T20:26:05Z")

</div>

Ooh, yes, the "Arduino ESP32 boards" package includes the Windows drivers that are useful to talk to the device.  
Thanks for letting us know 👍 and happy hacking!

---

<div class="post-metadata">

**Author:** ![sbhklr](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sbhklr/32/287585_2.png) [@sbhklr](https://forum.arduino.cc/u/sbhklr)\
**Post date:** [October 19, 2023, 1:50pm UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/6 "2023-10-19T13:50:44Z")

</div>

Hi @felipenmartins

I'm happy to hear that you were able to solve it. The thing about drivers on Windows is mentioned in the readme ([GitHub - arduino/lab-micropython-installer](https://github.com/arduino/lab-micropython-installer#%EF%B8%8F-installation)) but I understand that it's very easy to overlook. Bundling the drivers in the tool would make the maintenance much more complex so we decided not to do that. Maybe on Windows the tool could display a warning. I'll think about it 🙂

---

<div class="post-metadata">

**Author:** ![felipenmartins](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@felipenmartins](https://forum.arduino.cc/u/felipenmartins)\
**Post date:** [October 19, 2023, 4:44pm UTC](https://forum.arduino.cc/t/installing-micropython-on-esp32/1171239/7 "2023-10-19T16:44:19Z")

</div>

That would be interesting.  
Thanks! 🙂
