Error while installing bench.app:getting app frappe

I am stuck in the installation of ERPNext, My operating system in Linux Mint 18, I rest think everything is installed properly when i execute $bench get-app GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript i get following error,

tayyabali@ost ~/frappe-bench $ bench get-app GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
INFO:bench.app:getting app frappe
Cloning into ‘frappe’…
remote: Counting objects: 1853, done.
remote: Compressing objects: 100% (1711/1711), done.
remote: Total 1853 (delta 229), reused 731 (delta 90), pack-reused 0
Receiving objects: 100% (1853/1853), 11.89 MiB | 194.00 KiB/s, done.
Resolving deltas: 100% (229/229), done.
Checking connectivity… done.
installing frappe
INFO:bench.app:installing frappe
Command “/home/tayyabali/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-kbp25F/cffi/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-HMXe6t-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/tayyabali/frappe-bench/env/include/site/python2.7/cffi” failed with error code 1 in /tmp/pip-build-kbp25F/cffi/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/tayyabali/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/tayyabali/bench-repo/bench/commands/make.py”, line 30, in get_app
get_app(git_url, branch=branch)
File “/home/tayyabali/bench-repo/bench/app.py”, line 73, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/home/tayyabali/bench-repo/bench/app.py”, line 103, in install_app
find_links=find_links))
File “/home/tayyabali/bench-repo/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/frappe

Possibly frappe fails to compile due to a version mismatch?

In my case I get these

frappe@erpnext:~/frappe-bench$ uname -a
Linux erpnext 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:28:32 UTC 2016 i686 i686 i686 GNU/Linux

frappe@erpnext:~/frappe-bench$ bench --version
4.1.0
frappe@erpnext:~/frappe-bench$ python --version
Python 2.7.6

1 Like

@tayyabali_sayyad

You need to install libffi-devel or libffi-dev depending upon your base Linux for your system and then proceed with the installation.

1 Like

My versions are as follows

tayyabali@ost ~ $ python --version
Python 2.7.12
tayyabali@ost ~ $ bench --version
4.1.0
tayyabali@ost ~ $ uname -a
Linux ost 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

@tayyabali_sayyad

Please install sudo apt-get install libffi-dev libssl-dev and then install frappe on your machine.

Already installed but still its not working.

tayyabali@ost ~ $ sudo apt-get install libffi-dev libssl-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libffi-dev is already the newest version (3.2.1-4).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
tayyabali@ost ~ $ cd frappe-bench/
tayyabali@ost ~/frappe-bench $ bench --site site1.local install-app erpnext
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/commands/site.py”, line 152, in install_app
_install_app(app, verbose=context.verbose)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/installer.py”, line 100, in install_app
frappe.clear_cache()
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/init.py”, line 468, in clear_cache
for fn in get_hooks(“clear_cache”):
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/init.py”, line 783, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 70, in get_value
val = generator()
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/init.py”, line 761, in load_app_hooks
for app in [app_name] if app_name else get_installed_apps(sort=True):
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/init.py”, line 725, in get_installed_apps
installed = json.loads(db.get_global(“installed_apps”) or “[]”)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/database.py”, line 655, in get_global
return self.get_default(key, user)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/database.py”, line 667, in get_default
d = self.get_defaults(key, parent)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/database.py”, line 673, in get_defaults
defaults = frappe.defaults.get_defaults(parent)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/defaults.py”, line 72, in get_defaults
globald = get_defaults_for()
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/defaults.py”, line 180, in get_defaults_for
where parent = %s order by creation"“”, (parent,), as_dict=1)
File “/home/tayyabali/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/tayyabali/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, “Table ‘1bd3e0294da19198.tabDefaultValue’ doesn’t exist”)
tayyabali@ost ~/frappe-bench $

You have made progress - frappe is installed but erpnext is stuck creating the db!

I have never done an install - I simply grab a VM…

I see these install notes for eg. https://frappe.github.io/erpnext/install.html or GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

Maybe delete the db and reinstall a fresh one?

bench --site {sitename} --force reinstall

The command above and other ideas I found here How can I delete testing data - #6 by ItsRaichura