Bench broken - ashish-greycube/help GitHub Wiki

Issue: Bench broken > env folder is corrupt

Reason: pip install black inside the frappe virtual environment. Some pip installs in the virtual env may damage the env beyond repair.

Solution: delete env and recreate env using venv command

Install nvm and set node version to 14.x

as per larrydevops.com/erpnext/how-to-install-frappe-framework-bench-on-ubuntu-20-04-lts-focal-fossa/

  1. backup existing env folder cp frappe-bench/env /tmp/frappe-bench-env-backup
  2. delete existing env folder rm -rf frappe-bench/env
  3. create new env using virtualenv virtualenv frappe-bench/env
  4. Install apps, starting with frappe (pip packages) cd frappe-bench env/bin/python -m pip install -q -U -e apps/frappe
  5. Install other yarn packages of frappe cd frappe-bench/apps/frappe yarn install
  6. Install other apps cd frappe-bench/ env/bin/python -m pip install -q -U -e apps/erpnext env/bin/python -m pip install -q -U -e apps/hms etc..
  7. check other commands like build etc.. bench build