Bench get-app error

HI all

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

installing amc
INFO:bench.app:installing amc
Command "python setup.py 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/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/erpnext/bench-repo/bench/commands/make.py", line 30, in get_app
    get_app(git_url, branch=branch)
  File "/home/erpnext/bench-repo/bench/app.py", line 73, in get_app
    install_app(app=app_name, bench_path=bench_path, verbose=verbose)
  File "/home/erpnext/bench-repo/bench/app.py", line 103, in install_app
    find_links=find_links))
  File "/home/erpnext/bench-repo/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q  -e ./apps/amc

How can I resolve this?

Hello,

as of here

I made: frappe backup
+
backup files

then I reinstalled the ERPnext system

I made a restore from my backup based on:
https://github.com/frappe/erpnext/wiki/Restoring-From-ERPNext-Backup2

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.