Error in installing Paypal

Hello,
I was trying to integrate Paypal to my ERPNext, But I got the below Error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/commands.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/commands.py", line 163, in install_app
    _install_app(app, verbose=context.verbose)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/installer.py", line 94, in install_app
    app_hooks = frappe.get_hooks(app_name=name)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/__init__.py", line 719, in get_hooks
    hooks = _dict(load_app_hooks(app_name))
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/__init__.py", line 692, in load_app_hooks
    app_hooks = get_module(app + ".hooks")
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/__init__.py", line 599, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named paypal_integration.hooks

Anybody know how to resolve this issue?

I used the commands:

bench get-app paypal_integration https://github.com/frappe/paypal_integration
bench --site fmcg.erpnext install-app paypal_integration

Have you tried:

bench restart

I’ve seen the above error once in a while and restarting seems to clear it.

@Felipe_Orellana
When I tried ‘bench restart’ , I got the following error!

error: <class 'xmlrpclib.Fault'>, <Fault 10: 'BAD_NAME: frappe'>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==3.0.0', '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/utils.py", line 18, in restart
    restart_supervisor_processes()
  File "/home/erpnext/bench-repo/bench/utils.py", line 322, in restart_supervisor_processes
    exec_cmd('sudo supervisorctl restart {group}'.format(group=group), cwd=bench_path)
  File "/home/erpnext/bench-repo/bench/utils.py", line 100, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: sudo supervisorctl restart frappe:

also how to get pip log?

Perhaps one of the frappe dev members could help you with this one.

Looks like something is wrong with your bench installation.
Have you updated recently?

@Felipe_Orellana
I doubt whether I have to install / integrate the new apps only to the fresh site.
I am trying to install the ‘Paypal Integration’ in my customized ERPNext which has custom app.!

Anybody know about this?