From here… (adjust the 8.x.x to suit your needs)
cd /home/frappe/frappe-bench
bench switch-to-branch v8.x.x
bench update
.env/bin/pip install --upgrade pip==9.0.3
.env/bin/pip -q -e ./apps/frappe
.env/bin/pip -q -e ./apps/erpnext
bench migrate
From here… (adjust the 8.x.x to suit your needs)
cd /home/frappe/frappe-bench
bench switch-to-branch v8.x.x
bench update
.env/bin/pip install --upgrade pip==9.0.3
.env/bin/pip -q -e ./apps/frappe
.env/bin/pip -q -e ./apps/erpnext
bench migrate