Error on bench init for frappe v7.x.x

Hello everyone,

Currently trying to create a separate frappe-bench folder for a v7 but I’m experiencing problems after INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir

Note: I have v10 installed with a new site and it works perfectly. Bench version is 4.1.0 on develop branch. OS is Ubuntu 16.04.4.

Here’s the complete traceback:

~$ bench init frappe-bench --frappe-branch v7.x.x
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:./env/bin/pip -q install --upgrade pip
INFO:bench.utils:./env/bin/pip -q install wheel
INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone https://github.com/frappe/frappe.git --branch v7.x.x  --origin upstream
Cloning into 'frappe'...
remote: Counting objects: 146548, done.
remote: Total 146548 (delta 0), reused 0 (delta 0), pack-reused 146548
Receiving objects: 100% (146548/146548), 157.43 MiB | 855.00 KiB/s, done.
Resolving deltas: 100% (110696/110696), done.
Checking connectivity... done.
('installing', u'frappe')
INFO:bench.app:installing frappe
INFO:bench.utils:frappe-bench/env/bin/pip install -q  -e frappe-bench/apps/frappe --no-cache-dir
Command "python setup.py egg_info" failed with error code 1 in /home/littlehera/frappe-bench/apps/frappe/
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/littlehera/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/littlehera/bench/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 "/home/littlehera/bench/bench/utils.py", line 64, in init
    get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
  File "/home/littlehera/bench/bench/app.py", line 76, in get_app
    install_app(app=app_name, bench_path=bench_path, verbose=verbose)
  File "/home/littlehera/bench/bench/app.py", line 107, in install_app
    find_links=find_links))
  File "/home/littlehera/bench/bench/utils.py", line 140, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe-bench/env/bin/pip install -q  -e frappe-bench/apps/frappe --no-cache-dir

Any help will be appreciated.

Thanks!

1 Like

Got things working by doing a lot of work. Recording the steps here in case anyone needs it:

  • Reformatted laptop (had done too many things in the past 2 days just to get v7 working lol)
  • Downloaded the bench repo and followed manual install instructions
  • Changed the bench branch to a previous branch/commit
  • Reverted pip to version 9.0.3 using sudo pip install --force-reinstall pip==9.0.3 (to prevent errors looking for pip.req)
  • bench init frappe-bench --frappe-branch v7.x.x
  • cd frappe-bench; bench get-app --branch v7.x.x erpnext the_erpnext_repo*

Afterwards, tried bench start which didn’t work because procfile wasn’t auto-generated, nginx wasn’t running, etc. To fix this:

  • run bench setup procfile, socketio, redis.
  • check if nginx was running on localhost:80. If it’s not running and installation can’t be found, install nginx via sudo apt-get install nginx
  • try bench start (it should be working by now)
2 Likes