ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Bench command not working in erpnext


#1

when i run bench command, it give below error:

Traceback (most recent call last):
File “/usr/bin/bench”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3007, in
working_set.require(requires)
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 728, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: bench==4.1.0

what could be the problem?.. please help me, thanks in advance


#2

It’s seems to be either you’ve not installed the bench or you’ve uninstalled it.

Solution:

Clone bench repo from github https://github.com/frappe/bench bench-repo if don’t have the cloned repo.

Then Install it using sudo pip install ./bench-repo for global env and ./env/bin/pip install ./bench-repo for virtual env(Don’t forget to reactivate the virtual env after bench installation)