You are logged in as user root - this is not advisable. Rather login as your frappe or erpnext user, and run commands as that user.
You also need to be in the right subdir/folder. Try this… (I assume your user for the ERPNext system is “frappe”)
I added frappe user , but when I run bench version ,it showed following error.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 6, in
from pkg_resources import load_entry_point
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3088, in @_call_aside
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3072, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3101, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 574, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 892, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 778, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘bench’ distribution was not found and is required by the application
frappe@ubuntu-s-1vcpu-1gb-sgp1-01:/root$ sudo chown -R frappe:frappe ~/frappe-bench/*
[sudo] password for frappe:
frappe is not in the sudoers file. This incident will be reported.
frappe@ubuntu-s-1vcpu-1gb-sgp1-01:/root$
Maybe, could you advise in the command line interface, how can I install bench as a non root user ? what command do I need to go tru before start git clone and pip install ?