Vyos kernel compilation error for pyhton setup

diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
Makefile.config:232: *** Please set ‘PYTHON’ appropriately. Stop.
make[6]: *** [Makefile.perf:229: sub-make] Error 2
make[5]: *** [Makefile:110: install] Error 2
make[4]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 2
make[3]: *** [Makefile:1550: intdeb-pkg] Error 2
make[2]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1550: bindeb-pkg] Error 2

Your build environment probably lacks the python2 compatibility package which creates the proper symlink.

We recommend building with the VyOS docker container, see Build VyOS — VyOS 1.4.x (sagitta) documentation

Hi ,
How can I resolve the issue , I have entered in docker domain . which python version I have to set . How to check which is running .

Did you do it with the above instruction?

git clone -b current --single-branch https://github.com/vyos/vyos-build
docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:current bash

If yes, all needed packets already in container.

same issues:
Makefile.config:232: *** Please set ‘PYTHON’ appropriately. Stop.
make[6]: *** [Makefile.perf:229: sub-make] Error 2
make[5]: *** [Makefile:110: install] Error 2
make[4]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 2
make[3]: *** [Makefile:1550: intdeb-pkg] Error 2
make[2]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1550: bindeb-pkg] Error 2
vyos_bld@0c1cd547b6b2:/vyos/packages/linux-kernel$ ls

and I’m sure build the kernel in docker.

Hi, I am having the same exact error. Were you able to find the solution?

I managed to build an default ISO. Yet I need to build my own kernel so I can add thunderbolt modules. I have been struggling for a week. Right now I am following the guide to a tee, using v5.10.141 version(as in data/default.json) and have made no changes/modifications. And steel get errors.

vyos_bld@417831c13f9f:/vyos/vyos-build/packages/linux-kernel$ ./build-kernel.sh
...
  INSTALL debian/linux-libc-dev/usr/include
dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_5.10.141-1_amd64.deb'.
dpkg-deb: building package 'linux-image-5.10.141-amd64-vyos' in '../linux-image-5.10.141-amd64-vyos_5.10.141-1_amd64.deb'.
  BUILD:   Doing 'make -j4' parallel build
  HOSTCC   fixdep.o
  HOSTLD   fixdep-in.o
  LINK     fixdep
Warning: Kernel ABI header at 'tools/include/uapi/linux/stat.h' differs from latest version at 'include/uapi/linux/stat.h'
diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/errno.h' differs from latest version at 'arch/powerpc/include/uapi/asm/errno.h'
diff -u tools/arch/powerpc/include/uapi/asm/errno.h arch/powerpc/include/uapi/asm/errno.h
Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h'
diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
Makefile.config:242: *** python-config not found.  Stop.
make[6]: *** [Makefile.perf:229: sub-make] Error 2
make[5]: *** [Makefile:110: install] Error 2
make[4]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 2
make[3]: *** [Makefile:1560: intdeb-pkg] Error 2
make[2]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1560: bindeb-pkg] Error 2