Build Error - python2: Command not found

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Build Error - python2: Command not found

Post by devnull » Tue May 07, 2019 12:13 pm

Unable to build esp32, I only have python3 installed and don't want to install python 2.7 as it is being deprecated soon.

I have tried to force using python 3 with

Code: Select all

PYTHON=python3
but as you can see the kake command is still calling python 2

Code: Select all

# make V=1 PYTHON=python3
Create build/partitions.bin
python2 /nfs/qnap/dev/uPython/build/micropython/ports/esp32/esp-idf/components/partition_table/gen_esp32part.py -q partitions.csv build/partitions.bin
make: python2: Command not found
make: *** [Makefile:1016: build/partitions.bin] Error 127
# 
What is the fix for this ?

Thanks
Last edited by devnull on Tue May 07, 2019 12:59 pm, edited 1 time in total.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build Error - python2: Command not found

Post by jimmo » Tue May 07, 2019 12:46 pm

Here's the relevant section of the makefile:

Code: Select all

PYTHON2 ?= python2
PART_SRC = partitions.csv

$(BUILD)/partitions.bin: $(PART_SRC)
	$(ECHO) "Create $@"
	$(Q)$(PYTHON2) $(ESPCOMP)/partition_table/gen_esp32part.py -q $< $@

Try setting the PYTHON2 var instead, however it's possible the script may not work in 3.

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Build Error - python2: Command not found

Post by devnull » Tue May 07, 2019 12:59 pm

@jimmo - thanks so much, yes that worked :-)

Post Reply