Bench init fails on Ubuntu 14.04

I have a fresh Ubuntu VM and trying to install ERPNext manually.
When starting with bench init I get this set of errors

Traceback (m    ost recent call last):
  File "/usr/local/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/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/.bench/bench/commands/make.py", line 19, in init
    verbose=verbose, clone_from=clone_from)
  File "/home/frappe/.bench/bench/utils.py", line 46, in init
    setup_env(bench_path=path)
  File "/home/frappe/.bench/bench/utils.py", line 130, in setup_env
    exec_cmd('virtualenv -q {} -p {}'.format('env', sys.executable), cwd=bench_path)
  File "/home/frappe/.bench/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: virtualenv -q env -p /usr/bin/python

did you install virtualenv?

@normanu Yes

You don’t need to install virtualenv explicitly. Frappe Bench takes care of virtualenv itself.

yes, that’s what’s weird. I checked and virtualenv was already installed.

1 Like

Found the problem (and solution)

I’m running the bench init command on a vagrant shared folder and it is trying to create a symlink to the python executables in /env/bin which is not allowed by vagrant.

i had the same problem but i was naming the folder “ahmad bench” rename it to “ahmad-bench”
and i easily create a bench inside it