CommandFailedError(cmd) bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/hello --no-cache-dir

Hi I noticed with all the new installations of bench and erpnext i have been installing, when i create a new app, it fails

This is the error please help : sudo bench new-app hello
[sudo] password for erp: new app hello
App Title (default: Hello): h
App Title should start with a letter and it can only consist of letters, numbers, spaces and underscores
App Title (default: Hello):
App Description: hei
App Publisher: h
App Email:
App Icon (default ‘octicon octicon-file-directory’):
App Color (default ‘grey’):
App License (default ‘MIT’):
‘hello’ created at /home/frappe/frappe-bench/apps/hello hello
INFO:bench.utils:./env/bin/pip install -q -e ./apps/hello --no-cache-dir
Command “python egg_info” failed with error code 1 in /home/frappe/frappe-bench/apps/hello/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/”, line 40, in cli
File “/usr/local/lib/python2.7/dist-packages/click/”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/”, line 48, in new_app
File “/home/frappe/.bench/bench/”, line 156, in new_app
install_app(app, bench_path=bench_path)
File “/home/frappe/.bench/bench/”, line 167, in install_app
File “/home/frappe/.bench/bench/”, line 153, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/hello --no-cache-dir

I think the issue is still with the \n is there but when its creating its doesn’t do that it instead creates a new line.

this is the apps :

-- coding: utf-8 --

from setuptools import setup, find_packages
import re, ast

with open(‘requirements.txt’) as f:
install_requires =’

get version from version variable in cus/

_version_re = re.compile(r’version\s+=\s+(.*)')

with open(‘cus/’, ‘rb’) as f:
version = str(ast.literal_eval(‘utf-8’)).group(1)))

@chris.hawkson did you fix it? I’m with the same issue.


install_requires =’


install_requires =’\n’)

Will this commit be merged in master ?

i solved this 1 by :

i open file inside your new app module
i saw this code not correct
step 1

i fixed the code to :
step 2

after that, i copy this ./env/bin/pip install -q -e ./apps/crook --no-cache-dir
to my ssh at frappe-bench folder and enter

after that i put the new module name inside

step 4

and i install the module to the site i want to install it… install like usual with bench --site [sitename] install-app [appname]
and its work for me

hope it will patch to the master…

1 Like

(the above will work ) (escape new line char while creating boilerplate for app by saurabh6790 · Pull Request #5533 · frappe/frappe · GitHub ) but i think this is the solution but it was only merged with develop

thats adding an extra backslash to the \n in the setup_template