HELP! macOS Sierra clean install problems

I have been struggling with this. Tried everything so I did a reformat install of mac osX, made sure it was updated, then installed Xcode.

open terminal while being logged in as my personal user and followed all the steps to setup the environment as best I can and am getting the exact same errors on a clean system.

Followed this Turning a Mac into a Frappe Framework Developer Machine · frappe/bench Wiki · GitHub

Everything is fine until

sudo pip install -e bench-repo

I get this warning (in yellow):

The directory '/Users/joshreeder/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/joshreeder/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

It says it installs bench fine… Have tried to erase the folder and try again with the -H addition. Error is gone but next issue happens in both instances.

After i run

bench init frappe-bench --frappe-branch master

It gets stuck for a while at this line and then I get an error:

`INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir

Command “/Users/joshreeder/Dev/frappe-bench/env/bin/python2.7 -u -c “import setuptools, tokenize;file=‘/private/var/folders/0b/_mmfkmz53vbcbk5s2_k_zvz00000gn/T/pip-build-fjoe2U/mysqlclient/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/0b/_mmfkmz53vbcbk5s2_k_zvz00000gn/T/pip-yR2nU3-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/joshreeder/Dev/frappe-bench/env/bin/…/include/site/python2.7/mysqlclient” failed with error code 1 in /private/var/folders/0b/_mmfkmz53vbcbk5s2_k_zvz00000gn/T/pip-build-fjoe2U/mysqlclient/

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/Users/joshreeder/Dev/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/Users/joshreeder/Dev/bench-repo/bench/commands/make.py”, line 19, in init
verbose=verbose, clone_from=clone_from)
File “/Users/joshreeder/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/joshreeder/Dev/bench-repo/bench/app.py”, line 76, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/Users/joshreeder/Dev/bench-repo/bench/app.py”, line 107, in install_app
find_links=find_links))
File “/Users/joshreeder/Dev/bench-repo/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir`

So I’m new to all of this, but is there a connection between the first ‘pip’ cache permission warning and the following issue of --no-cache-dir related to pip and mysqlclient?

Yes its python 2.7, and mysql and mariadb are running.

Got workarounds figured out for my issues and there were a lot trying to get this working not sure what is the real bug that needs fixed but here is what i had to do for anyone reading this.
https://discuss.frappe.io/t/error-when-running-bench-update-macos/24421/17?u=joshreeder

1 Like