Cannot install new app in bench

Hi I’m trying to install a new app in bench using bench new-app erpnext_flipkart

The following error occurred. Please help.

‘erpnext_flipkart’ created at /home/frappe/frappe-bench/apps/erpnext_flipkart
INFO:bench.app:installing erpnext_flipkart
INFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext_flipkart --no-cache-dir
Command “python setup.py egg_info” failed with error code 1 in /home/frappe/frappe-bench/apps/erpnext_flipkart/
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.2.0 documentation.
SNIMissingWarning
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.2.0 documentation.
InsecurePlatformWarning
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.2.0 documentation.
InsecurePlatformWarning
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/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/make.py”, line 46, in new_app
new_app(app_name)
File “/home/frappe/.bench/bench/app.py”, line 126, in new_app
install_app(app, bench_path=bench_path)
File “/home/frappe/.bench/bench/app.py”, line 137, in install_app
find_links=find_links))
File “/home/frappe/.bench/bench/utils.py”, line 142, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/erpnext_flipkart --no-cache-dir

I’m using the below versions

Frappe Framework: v10.1.36 (master)
ERPNext: v10.1.38 (master)

Hi

run this command

./env/bin/pip install --upgrade pip==9.0.3

Cannot find pip directory.
But I’ve managed to upgrade by using sudo pip install --upgrade pip==9.0.3
Later if I try to install the app, another new error came.

‘erpnext_flipkart’ created at /home/frappe/frappe-bench/apps/erpnext_flipkart
INFO:bench.app:installing erpnext_flipkart
INFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext_flipkart --no-cache-dir
/bin/sh: 1: ./env/bin/pip: not found
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/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/make.py”, line 48, in new_app
new_app(app_name)
File “/home/frappe/.bench/bench/app.py”, line 168, in new_app
install_app(app, bench_path=bench_path)
File “/home/frappe/.bench/bench/app.py”, line 179, in install_app
find_links=find_links))
File “/home/frappe/.bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/erpnext_flipkart --no-cache-dir

I’ve setup my ERP in production mode. Is there any other way to install apps in production mode?
Not sure if this configuration is related in any way, below is my site_config.json

{
“db_name”: “1bd3e0294da19198”,
“db_password”: “xxxxxxxxxxxx”,
“developer_mode”: 1,
“dormant”: true,
“encryption_key”: “xxxxxxxxxxxx”,
“limits”: {
“space_usage”: {
“backup_size”: 263.0,
“database_size”: 659.12,
“files_size”: 158.0,
“total”: 1080.12
}
}
}

/bin/sh: 1: ./env/bin/pip: not found

=> pls search this error in forum

Is there any other way to install apps in production mode?

→ production mode can install app

try run this. I notyet test. But correct way you need to fix this error “/bin/sh: 1: ./env/bin/pip: not found”

sudo pip install -q -e ./apps/erpnext_flipkart --no-cache-dir

The below error came when I’ve tried the above command.

Command “python setup.py egg_info” failed with error code 1 in /home/frappe/frappe-bench/apps/erpnext_flipkart/

Did anyone come across this kind of error while installing a new bench app?

Download pip from: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
and install it using:
./env/bin/python get-pip.py

after installation of pip deactivate the env and activate it again.

install the erpnext_flipcart manually using:
./env/bin/pip install -q -e ./apps/erpnext_flipkart --no-cache-dir

You can’t use frappe and erpnext in sudo user env.
It’s not recommend.
Try to install it on custom environment.

Yes I am suffering with this error and could not found any solution.