Page 1 of 1

Build Error - python2: Command not found

Posted: Tue May 07, 2019 12:13 pm
by devnull
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

Re: Build Error - python2: Command not found

Posted: Tue May 07, 2019 12:46 pm
by jimmo
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.

Re: Build Error - python2: Command not found

Posted: Tue May 07, 2019 12:59 pm
by devnull
@jimmo - thanks so much, yes that worked :-)