I’m encountering a subprocess-related error while attempting to create a new Frappe application using the bench new-app command. Previously, the environment was working without issues. I have tested creating an application from multiple servers and in different environments, but the same error consistently appears across different servers. I am currently working within a virtual environment.
Below is the terminal output when running the command:
frappe@devuan:~/frappe-bench/apps$ bench new-app saple
App Title [Saple]:
App Description: School Authorization and Private Licensing Establishment System
App Publisher: Hamza
App Email: hamza1@gmail.com
App License (agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, unlicense) [mit]:
Create GitHub Workflow action for unittests [y/N]: y
‘saple’ created at /home/frappe/frappe-bench/apps/saple
Installing saple
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/saple
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7e440ca50>: Failed to establish a new connection: [Errno -2] Name or service not known’)‘: /simple/flit-core/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7e561e810>: Failed to establish a new connection: [Errno -2] Name or service not known’)‘: /simple/flit-core/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7e3f023d0>: Failed to establish a new connection: [Errno -2] Name or service not known’)‘: /simple/flit-core/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7e3eecb90>: Failed to establish a new connection: [Errno -2] Name or service not known’)‘: /simple/flit-core/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7e3edbed0>: Failed to establish a new connection: [Errno -2] Name or service not known’)': /simple/flit-core/
ERROR: Could not find a version that satisfies the requirement flit_core<4,>=3.4 (from versions: none)
ERROR: No matching distribution found for flit_core<4,>=3.4
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/saple
subprocess.CalledProcessError: Command '/home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/saple ’ 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
sys.exit(cli())
^^^^^
File “/usr/local/lib/python3.11/dist-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.11/dist-packages/bench/commands/make.py”, line 181, in new_app
new_app(app_name, no_git)
File “/usr/local/lib/python3.11/dist-packages/bench/app.py”, line 541, in new_app
install_app(app, bench_path=bench_path)
File “/usr/local/lib/python3.11/dist-packages/bench/app.py”, line 573, in install_app
bench.run(
File “/usr/local/lib/python3.11/dist-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/saple