How to have v13 bench(python 3.8) on ubuntu 22 - ashish-greycube/help GitHub Wiki

When we have v14-bench(python 3.10)on ubuntu 22, along with that we want v13-bench(python 3.8), follow following steps:

First check python version,
python3 -V

Run following commands:

sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.8 python3.8-dev
sudo apt install python3.8-venv
sudo apt install virtualenv
virtualenv --python python3.8 env
bench init /home/greycube/v13-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-13 --python /usr/bin/python3.8
bench get-app erpnext https://github.com/frappe/erpnext --branch version-13

Run following command only if required:

env/bin/pip install -e apps/frappe -e apps/erpnext

How to know python version on bench:

source env/bin/activate
python


You have python 3.6 and want to upgrade to 3.8:

Root user

  • sudo apt install python3.8 python3.8-dev
  • sudo apt install python3.8-venv
  • sudo apt install virtualenv

Frappe user

  • mv env env-old
  • virtualenv --python python3.8 env
  • env/bin/pip install -U pip
  • env/bin/pip install -e apps/frappe -e apps/erpnext
  • do above for all apps in sites/apps.txt
  • rm -rf env-old
⚠️ **GitHub.com Fallback** ⚠️