We had cloned the bench repo and executed command
bench init frappe1
We are facing Issue:
File “/ERPNext/xyz/dev/bench_repo/bench/utils.py”, line 106, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe1/env/bin/pip install -q -e frappe1/apps/frappe
To get the exact root cause of the failure we ran below command
$ frappe1/env/bin/pip install -v -q -e frappe1/apps/frappe
Obtaining file:///ERPNext/xyz/dev/frappe1/apps/frappe
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/ERPNext/xyz/dev/frappe1/apps/frappe/setup.py”, line 2, in
from pip.req import parse_requirements
ImportError: No module named req
From above stacktrace it is clear that bench uses pip from the env/bin directory.
By reading at pip documentation we found that after pip version 10 they had changed the pip.req to pip._internal.req
Bench init command by default installs latest pip version which is 18 at present.
$ frappe1/env/bin/pip --version
pip 18.0 from /ERPNext/xyz/dev/frappe1/env/lib/python2.7/site-packages/pip (python 2.7)
Global PIP version installed on my machine is 9.0.3
$ pip --version
pip 9.0.3 from /usr/lib/python2.7/site-packages (python 2.7)
Can we configure bench to use globally installed pip?