Installation Issue in Setup first bench & Install an app

When I run this command
bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench

I got an error like this

if I run this command

bench init --skip-redis-config-generation --frappe-branch version-13 frappe-bench

then I got an error in ERPNext Install

bench get-app --branch version-12 erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)

follow this issue Can't install ERPNext v12 on frappe/bench image · Issue #588 · frappe/frappe_docker · GitHub

For immediate workaround:

docker pull frappe/bench:latest to get the image with 3.9. It will allow installing version-13.

I was able to use GitHub - pyenv/pyenv: Simple Python version management in the devcontainer.

from devcontainer:

  • sudo apt install -y python2
  • curl | bash
  • add following lines in ~/.bashrc :
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
  • pyenv install 3.7.12
  • bench init --python ~/.pyenv/versions/3.7.12/bin/python --frappe-branch version-12 frappe-bench-v12 --skip-redis-config-generation