[FIXED] Error When running `make build` command from mastering-plone -> Installation Chapter

System Specifications:

OS: Ubuntu 22.04.3 LTS
Terminal: Bash
Global/System Python: Python 3.10.12

What I was trying to do

I was following the installation docs given here: https://training.plone.org/mastering-plone/installation.html

In the 5.3. Installing the backend section, when I run the command make build I get this error:

++ tput setaf 2
++ tput sgr0
+ echo '==> Setup Virtual Env'
==> Setup Virtual Env
+ python -m venv venv
pyenv: python: command not found

The `python' command exists in these Python versions:
  3.9.9
  3.9.9/envs/kolibri-py3.9
  kolibri-py3.9

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.
make: *** [Makefile:30: bin/pip] Error 127

The Cause

Inside the MakeFile python is used instead of python3. In my system to start a python interpreter I have to type python3 not python. I guess it is for all Linux distros now. I may be wrong. Anyways.

Fix

Just change python to python3 inside MakeFile

Specifically these commands:


bin/pip:
	@echo "$(GREEN)==> Setup Virtual Env$(RESET)"
	python3 -m venv venv
	venv/bin/pip install -U "pip" "wheel" "cookiecutter" "mxdev"

instance/etc/zope.ini: bin/pip
	@echo "$(GREEN)==> Install Plone and create instance$(RESET)"
	venv/bin/cookiecutter -f --no-input --config-file instance.yaml https://github.com/plone/cookiecutter-zope-instance

.PHONY: build
build: instance/etc/zope.ini ## pip install Plone packages
	@echo "$(GREEN)==> Setup Build$(RESET)"
	venv/bin/mxdev -c mx.ini
	venv/bin/pip install -r requirements-mxdev.txt

.PHONY: start
start: ## Start a Plone instance on localhost:8080 in debug mode
	PYTHONWARNINGS=ignore venv/bin/runwsgi -d instance/etc/zope.ini