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/
- backup existing env folder cp frappe-bench/env /tmp/frappe-bench-env-backup
- delete existing env folder rm -rf frappe-bench/env
- create new env using virtualenv virtualenv frappe-bench/env
- Install apps, starting with frappe (pip packages) cd frappe-bench env/bin/python -m pip install -q -U -e apps/frappe
- Install other yarn packages of frappe cd frappe-bench/apps/frappe yarn install
- 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..
- check other commands like build etc.. bench build