Fresh bench install Error in frappe installing

Hey ppl,

Happy New Year to all,

I am using bench 4.1.0 version
and after: bench init test-bench I have the following error

Already using interpreter /usr/local/opt/python/bin/python2.7
INFO:bench.app:getting app frappe
Cloning into 'frappe'...
remote: Counting objects: 1910, done.
remote: Compressing objects: 100% (1761/1761), done.
remote: Total 1910 (delta 251), reused 736 (delta 94), pack-reused 0
Receiving objects: 100% (1910/1910), 12.54 MiB | 545.00 KiB/s, done.
Resolving deltas: 100% (251/251), done.
installing frappe
INFO:bench.app:installing frappe
Command "/Users/kickapoo/Dev/frappe-dev/test-bench/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tc/vd5jf3zn0zd5glqctt1h_0d80000gn/T/pip-build-R48V_v/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/tc/vd5jf3zn0zd5glqctt1h_0d80000gn/T/pip-mUa1hW-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/kickapoo/Dev/frappe-dev/test-bench/env/bin/../include/site/python2.7/mysql-python" failed with error code 1 in /private/var/folders/tc/vd5jf3zn0zd5glqctt1h_0d80000gn/T/pip-build-R48V_v/mysql-python/
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/Users/kickapoo/Dev/frappe-dev/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/kickapoo/Dev/frappe-dev/bench-repo/bench/commands/make.py", line 19, in init
    verbose=verbose, clone_from=clone_from)
  File "/Users/kickapoo/Dev/frappe-dev/bench-repo/bench/utils.py", line 56, in init
    get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
  File "/Users/kickapoo/Dev/frappe-dev/bench-repo/bench/app.py", line 73, in get_app
    install_app(app=app_name, bench_path=bench_path, verbose=verbose)
  File "/Users/kickapoo/Dev/frappe-dev/bench-repo/bench/app.py", line 103, in install_app
    find_links=find_links))
  File "/Users/kickapoo/Dev/frappe-dev/bench-repo/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: test-bench/env/bin/pip install -q  -e test-bench/apps/frappe```

Have you installed mysql prerequisites?

@rmehta I have a another bench (eso-bench) that works fine (this bench is not updated the last 10 days). I haven’t made the any bench update because a colleague made it (we use the same dev environment) and break everything in frappe updating. After that I had to find a solution for my colleague and replicate the error. As you see from the error I can’t even bench init.

So mysql prerequisites yes they are install and double checked after your comment :slight_smile:

I have the same error - just getting started 2 days ago and every time I get to “bench init frappe-bench” it crashes. I also installed mariadb before and am working off Mac OS. My error is identical (except for minor changes for user names and their associated folders).

@ksh

Please try to reinstall mysql wrapper: ‘pip install mysql-python’.

It did the trick for me.

Do I need to uninstall mariadb and python first? I tried this command and received error message below:

Command “/usr/bin/python -u -c “import setuptools, tokenize;file=‘/private/tmp/pip-build-bE0F5X/mysql-python/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-v5vSB7-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /private/tmp/pip-build-bE0F5X/mysql-python/

I’ve also checked my PATH and /usr/local/bin includes some mysql files. I added on /usr/local/Cellar/mariadb/10.1.20/bin/ as well since I used Homebrew for mac’s, but received the same error as above (build # changed)

@ksh Please share your error trace.

I dont recall, is it your first bench init ? If yes have you changed the mariadb my.conf. Check this link Turning a Mac into a Frappe Framework Developer Machine · frappe/bench Wiki · GitHub for more detail instructions.