Bench get-app error

HI all

When I tried to get app in the production server i got the following error

installing amc amc
Command "python egg_info" failed with error code 1 in /tmp/pip-build-J3oZ4d/frappe/
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/", line 40, in cli
  File "/usr/local/lib/python2.7/dist-packages/click/", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/commands/", line 30, in get_app
    get_app(git_url, branch=branch)
  File "/home/erpnext/bench-repo/bench/", line 73, in get_app
    install_app(app=app_name, bench_path=bench_path, verbose=verbose)
  File "/home/erpnext/bench-repo/bench/", line 103, in install_app
  File "/home/erpnext/bench-repo/bench/", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q  -e ./apps/amc

How can I resolve this?


as of here

I made: frappe backup
backup files

then I reinstalled the ERPnext system

I made a restore from my backup based on:

Everything works well.
This solved the issue

It seem in my case the
sudo apt-get update
sudo apt-get upgrade
made some changes in python2.7 pip install.