Bench init fails on mac

Hello everyone,

I am unable to install frappe bench on my mac OS X. Whenever I type bench init frappe-bench it throws an error.

/bin/sh: ./env/bin/pip: "/Users/akinwale/Documents/Code/Web: bad interpreter: No such file or directory
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==4.1.0’, ‘console_scripts’, ‘bench’)()
File “/Users/akinwale/Documents/Code/Web development/Backend development/Projects/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/Library/Python/2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/Library/Python/2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/Library/Python/2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Library/Python/2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Library/Python/2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/Users/akinwale/Documents/Code/Web development/Backend development/Projects/frappe/bench-repo/bench/commands/make.py”, line 21, in init
verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
File “/Users/akinwale/Documents/Code/Web development/Backend development/Projects/frappe/bench-repo/bench/utils.py”, line 54, in init
setup_env(bench_path=path)
File “/Users/akinwale/Documents/Code/Web development/Backend development/Projects/frappe/bench-repo/bench/utils.py”, line 144, in setup_env
exec_cmd(‘./env/bin/pip -q install --upgrade pip’, cwd=bench_path)
File “/Users/akinwale/Documents/Code/Web development/Backend development/Projects/frappe/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip -q install --upgrade pip

Please can anyone tell me what to do?

Thank you

The ‘whitespace’ in your path may be the cause of your problem?

Maybe reinstall with no whitespace will solve the problem.

Otherwise perhaps a mac user can advise what you must do in your case assuming that is the problem.

Investigate these 2 pointers:

Hello @clarkedj, please what path are referring to in your response.

Thank you

See the space character in ‘Web Development’ below

/bin/sh: ./env/bin/pip: "/Users/akinwale/Documents/Code/Web: bad interpreter: No such file or directory

File “/Users/akinwale/Documents/Code/Web development/Backend development/Projects/frappe/bench-repo/bench/cli.py”, line 40, in cli

Ok clarkj. I think the path I was running the bench from is not in my syspath, which explains why the command did not work.

However, I have resolved that issue. and this error now comes up when i use bench init <new_bench>

bench.utils.CommandFailedError: git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --origin upstream

Hi all,

All I needed was a restart for bench init to work.

Thanks for all the help