MacOS High Sierra - Error Updating bench 2017 09 28

Hello!
I’m trying to update bench (bench update) but I get an error I think when try to process some updates. The error that I get is:

Updating Python libraries…
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /Users/anibal/PythonDev/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Command “/Users/anibal/PythonDev/frappe-bench/env/bin/python2.7 -u -c “import setuptools, tokenize;file=‘/private/var/folders/mv/p463hn_53s5fznvpbwt74bbm0000gn/T/pip-build-x0x5RB/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/mv/p463hn_53s5fznvpbwt74bbm0000gn/T/pip-sNVSpt-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/anibal/PythonDev/frappe-bench/env/bin/…/include/site/python2.7/mysqlclient” failed with error code 1 in /private/var/folders/mv/p463hn_53s5fznvpbwt74bbm0000gn/T/pip-build-x0x5RB/mysqlclient/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/Users/anibal/PythonDev/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/anibal/PythonDev/bench-repo/bench/commands/update.py”, line 58, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
File “/Users/anibal/PythonDev/bench-repo/bench/commands/update.py”, line 74, in _update
update_requirements(bench_path=bench_path)
File “/Users/anibal/PythonDev/bench-repo/bench/utils.py”, line 410, in update_requirements
install_requirements(pip, req_file)
File “/Users/anibal/PythonDev/bench-repo/bench/utils.py”, line 446, in install_requirements
exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
File “/Users/anibal/PythonDev/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt

Can someone help me to solve this?

Tks

Hi. Forum search gives 23 results for the query with the last line of your error log.
Which possible solutions of those have you tried so far?

Good point… none … :smile:
I’m thinking so much that my problem is about the recent update of my macos that I don’t even try to search if it’s a common problem … sorry. I’ll try with your kindly searched link.

At moment, I found that I don’t have reinstalled the xcode tools … I already did and still have the problem … I’m going to search on other post too…

Tks

1 Like

OK. After I tried with several links … I solve that I think is the first part for my issue.

With this thread Error when running bench update (MacOS) - #18 by joshreeder I solved the initial issue.

First at all, I think or I’m sure that the problem is generating after the upgrade of MacOS to High Sierra.

Now I get another message when I tried bench update or bench retry-upgrade …

➜ frappe-bench bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /Users/anibal/PythonDev/bench-repo/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/library_management/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN frappe@ No description
    Backing up sites…
    /Users/anibal/PythonDev/frappe-bench/env/bin/python: dlopen(/Users/anibal/PythonDev/frappe-bench/env/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: /usr/local/opt/mariadb/lib/libmysqlclient.18.dylib
    Referenced from: /Users/anibal/PythonDev/frappe-bench/env/lib/python2.7/site-packages/_mysql.so
    Reason: image not found

I search on the forums but I can’t find anything to help me.
Do I need to open another thread for this?

Thanks

Is this a fresh install of frappe or an existing one?
Have you followed this guide?

Also High Sierra has had a laundry list of bugs discovered since its launch. Maybe best to stick with Sierra for a while?

BTW : Excellent installation guide Achilles.

Is an existing one installation made as a fresh one in Sierra.
I know that High Sierra have a lot of bugs, but it’s not possible to me make a downgrade now …
I’m going to see the link you provided, maybe I get some ideas to fix my issue.

Thanks.

Just for try, I made the symlink for

from /usr/local/opt/mariadb/lib/libmysqlclient.dylib to /usr/local/opt/mariadb/lib/libmysqlclient.18.dylib , but then I get the message :

INFO:bench.utils:npm install
npm WARN frappe@ No description
Backing up sites…
/Users/anibal/PythonDev/frappe-bench/env/bin/python: dlopen(/Users/anibal/PythonDev/frappe-bench/env/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: /usr/local/opt/mariadb/lib/libmysqlclient.18.dylib
Referenced from: /Users/anibal/PythonDev/frappe-bench/env/lib/python2.7/site-packages/_mysql.so
Reason: Incompatible library version: _mysql.so requires version 18.0.0 or later, but libmysqlclient.18.dylib provides version 3.0.0

I think I have a problem with versions of some software … I don’t know if the problem is MariaDb, Python or what … :slight_smile:

Please if somebody can help me I would be appreciated.

OK. Just for close this thread … I solved this issue.

Following another thread I did the commands :

brew unlink mariadb

brew install mariadb-connector-c
ln -s /usr/local/opt/mariadb-connector-c/bin/mariadb_config /usr/local/bin/mysql_config

pip2 uninstall mysqlclient
pip2 install mysqlclient

rm /usr/local/bin/mysql_config
brew unlink mariadb-connector-c
brew link mariadb

But, later I saw that the errors showed in screen are with another path of pip:

./env/bin/pip

So, I did the same commands but pointing to this enviroment …

brew unlink mariadb

brew install mariadb-connector-c
ln -s /usr/local/opt/mariadb-connector-c/bin/mariadb_config /usr/local/bin/mysql_config

./env/bin/pip uninstall mysqlclient
./env/bin/pip install mysqlclient

rm /usr/local/bin/mysql_config
brew unlink mariadb-connector-c
brew link mariadb

After that I can run almost ok a “bench update” command …

I have another issue , but first at all I’m going to search about that :wink:

Thread Closed I think.

It might be easier to just do a complete uninstall/reinstall of all the required components (using the Achilles tutorial) as your install is having so many issues. Good luck :slight_smile: