Update Error: No Module named frappe.utils

I’m installing Frappe-Bench and ERPNext. I’ve got frappe installed, but when I run bench update I’m getting No module named frappe.utils. Does anyone know what this means? (I’m logged in as frappe and sending the command inside the frappe-bench folder)

INFO:bench.utils:updating bench Already up-to-date. Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages /home/frappe/frappe-bench/env/bin/python: No module named frappe.utils Traceback (most recent call last): File "/usr/bin/bench", line 11, in <module> load_entry_point('bench', 'console_scripts', 'bench')() File "/home/frappe/.bench/bench/cli.py", line 40, in cli bench_command() File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/frappe/.bench/bench/commands/update.py", line 60, in update _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force) File "/home/frappe/.bench/bench/commands/update.py", line 90, in _update patch_sites(bench_path=bench_path) File "/home/frappe/.bench/bench/utils.py", line 161, in patch_sites run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path) File "/home/frappe/.bench/bench/utils.py", line 501, in run_frappe_cmd raise CommandFailedError(args) bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

@Jesse_Mainee

How did you install your frappe-bench ? As looking at the error it feels your apps folders does not have frappe or Frappe was not installed properly in your setup.

I appreciate the help. I used the easy setup script but then had to resort to installing a few of the requirements manually as I had multiple localhost authentication issues. I believe I’ve resolved them.

Frappe is showing up in the directory and seems to have all it’s contents in there. You could be right, maybe I’ve confused it by using the mixture of both methods.

I’m now getting this error on bench-update:

INFO:bench.utils:updating bench Already up-to-date. Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uMGHTR/frappe/ Traceback (most recent call last): File "/usr/bin/bench", line 11, in <module> load_entry_point('bench', 'console_scripts', 'bench')() File "/home/frappe/.bench/bench/cli.py", line 40, in cli bench_command() File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/frappe/.bench/bench/commands/update.py", line 60, in update _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force) File "/home/frappe/.bench/bench/commands/update.py", line 79, in _update update_requirements(bench_path=bench_path) File "/home/frappe/.bench/bench/utils.py", line 375, in update_requirements install_requirements(pip, req_file) File "/home/frappe/.bench/bench/utils.py", line 379, in install_requirements exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file)) File "/home/frappe/.bench/bench/utils.py", line 127, in exec_cmd raise CommandFailedError(cmd) bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/erpnext/requirements.txt

UPDATE:

For anyone with this issue:
I was able to fix this by removing, then reinstalling both frappe and erpnext

I’m having the same problem and am wondering whether there’s another, less drastic, solution.

Is rerunning ‘bench update’ a few more times less drastic - I found that solved the problem ;-).

Any solution for this Issue without remove frappe and erpnext?

Try this