Error: Installation on the school app


I am facing an issue while installing the School app from git from the file. I have also updated the pip, but still it’s giving the same issue. Can anyone help me with this issue? It will be more helpful.

bench get-app schools
A directory for the application 'schools' already exists. Do you want to continue and overwrite it? [y/N]: y
INFO: App moved from apps/schools to archived/apps/schools-2023-05-24_3
Getting schools
$ git clone  --depth 1 --origin upstream
Cloning into 'schools'...
remote: Enumerating objects: 355, done.
remote: Counting objects: 100% (355/355), done.
remote: Compressing objects: 100% (318/318), done.
remote: Total 355 (delta 104), reused 157 (delta 13), pack-reused 0
Receiving objects: 100% (355/355), 2.01 MiB | 3.19 MiB/s, done.
Resolving deltas: 100% (104/104), done.
Ignoring dependencies of To install dependencies use --resolve-deps
Installing schools
$ /home/kbn/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/kbn/frappe-bench/apps/schools 
  error: subprocess-exited-with-error
  × python egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/kbn/frappe-bench/apps/schools/", line 3, in <module>
          from pip.req import parse_requirements
      ModuleNotFoundError: No module named 'pip.req'
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
subprocess.CalledProcessError: Command '/home/kbn/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/kbn/frappe-bench/apps/schools ' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
  File "/usr/local/lib/python3.10/dist-packages/bench/", line 127, in cli
  File "/usr/lib/python3/dist-packages/click/", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/", line 159, in get_app
  File "/usr/local/lib/python3.10/dist-packages/bench/", line 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/", line 242, in install
  File "/usr/local/lib/python3.10/dist-packages/bench/", line 573, in install_app
  File "/usr/local/lib/python3.10/dist-packages/bench/", line 48, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/", line 158, in exec_cmd
    raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)

Thank you in advance.

Try to install first and schools app

python3 -m pip install pip==9.0.3

Hope you help this…!

Hi @pra17shant,

Thanks for you response, but after updating also still am facing the same error.

Thank you in advance.


This is solved. The problem is in the git I have trying to pull. The repo i was trying to pull is older one.

For installtion of the school app:

This is working for me.

Thank for all you view on this and hope this solution will help others.