How to create new Bench?

For development, I have downloaded the dev VM Image (https://erpnext.com/download). As it has all the required tools installed (including bench). When I try to run following command

frappe@erpnext:/media/sf_erpnext$ bench init dada_pota_bench

I get this error

Already using interpreter /usr/bin/python
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 925, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1370, in install_python
    os.symlink(py_executable_base, full_pth)
OSError: [Errno 30] Read-only file system
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/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-repo/bench/commands/make.py", line 19, in init
    verbose=verbose, clone_from=clone_from)
  File "/home/frappe/bench-repo/bench/utils.py", line 46, in init
    setup_env(bench_path=path)
  File "/home/frappe/bench-repo/bench/utils.py", line 130, in setup_env
    exec_cmd('virtualenv -q {} -p {}'.format('env', sys.executable), cwd=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: virtualenv -q env -p /usr/bin/python
frappe@erpnext:/media/sf_erpnext$ 

Just wondering what can be reason?

bench commands you typically run in /home/frappe/frappe-bench

I’m not sure what ‘bench init’ does, but maybe you are running that in /media/sf_erpnext and cannot write to it?

What do you get when you run ‘pwd’ and ‘ls -al’?

I do have the write permission, so that’s not an issue. I have not found any docs to create multiple bench online :frowning:

What write permission do you refer to - you don’t think you have a path issue?

Seems like a permission issue for sure.

1 Like

Hmm. I believe it’s a shared folder between my host mac and linux guest so that’s why I am getting this error? Even though I changed the folder permission like this to allow the bench to run.

sudo usermod -a -G vboxsf frappe

@clarkej, @rmehta

When I try to run the command bench init my_app_bench in home directory, it’s stuck at Already using interpreter /usr/bin/python. Checkout the below screenshot.

bench init my_app_bench command failed with this error.

http://imgur.com/a/9B8if

“bench commands you typically run in /home/frappe/frappe-bench”

cd /home/frappe/frappe-bench

Sorry I am new to this but that’s where it get confusing. Why I have to run this command from within /home/frappe/frappe-bench when it was also created with this command like this bench init frappe-bench

My GOAL is to create my own bench and add just the frappe and my own apps (not the erpnext app for now) with my own sites (as far as I have understood the frappe and erpnext for now) so that I can understand the frappe framework.

bench init folder-name command creates a new instance of bench.
This command shouldn’t be run from an existing frappe-bench directory

1 Like

Thanks for clearing that up. Can you look up into this thread to see what’s wrong

Thanks.

Well the issue was in downloading the pdfkit repo. I am new to Frappe framework and finding it hard to complete the instillation process which is very frustrating tbh :rage: Documentation is not good at all.

Today I tried to install frappe on my digitalocean droplet and same experience. :frowning:

“I have not found any docs to create multiple bench online”

Is your multiple bench goal supported or instead you need to script this yourself @itsaboutcode

For example here ‘bench init’ applies in a fresh install where no preexisting bench:

Me, I prefer to skip the install process and instead get a working VM instance…