[ERROR]: Bench update bad interpreter error

Today on bench update I got this error:
zsh: /usr/local/bin/bench: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory

What does it mean and how can I resolve it?

You can try to run the update using the virtualenv provided in the installation - cd into frappe-bench folder and run
source env/bin/activate

This provides you with the correct environment and correct interpreters to run bench commands.

Thank you @alec_ruizramon1 for your response.
Unfortunately I got the same error message even in the (env)->frappe-bench

What is the result of python --version?


Try updating python to 2.7.11…but it looks as if there is a pathing issue with the interpreter (that I unfortunately don’t know enough to give great advice for)

@alec_ruizramon1 try this: > macos - pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory - Stack Overflow

Didn’t help :frowning:
Still the same message.
I also suspect path issue as @alec_ruizramon1 noticed but I don’t know how to fix it

Are you using the frappe user?

How can I check it @anand ?

On your server type: whoami

whoami gives me makis, the user I am :smiley:
So, what’s next @anand?

@emakis use root and type su frappe or if you know the password of frappe user the from your current user use su frappe and enter frappe user password, then do the above again…

If you are on your server you need to update using frappe user!

If on your own machine, then there are most likely 2 pythons on your machine.

Anand Doshi


@emakis zsh!!? what os and version you are using?