Why bench doesn’t not install my library during setup?
Not help me restart and some other stuff like: bench restart
and bench build
and bench switch-to-master --upgrade
and bench migrate bench clear-cache bench clear-website-cache
frappe@erpnext:~/frappe-bench$ python
Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import colorama
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named colorama
ERROR
I found interesting thing that it works in this way:
frappe@erpnext:~/frappe-bench$ bench shell
frappe@erpnext:~/frappe-bench/sites$ python
Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import colorama
from colorama import init
OK! Works!
But why I see on my site error with import
how to fix this I don’t know:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 30, in execute_cmd
method = get_attr(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 114, in get_attr
method = frappe.get_attr(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 859, in get_attr
return getattr(get_module(modulename), methodname)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 643, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module import(name)
File “/home/frappe/frappe-bench/apps/custom_application/custom_application/rest_api_lib.py”, line 11, in
from colorama import init
ImportError: No module named colorama
from fedex.services.track_service import FedexTrackRequest <--- error module not found
from fedex.config import FedexConfig <--- error module not found
Traceback (most recent call last):
File “/home/naztech/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/naztech/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/home/naztech/.local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/naztech/.local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/naztech/.local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/naztech/.local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/naztech/.local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/naztech/bench/bench/commands/update.py”, line 138, in switch_to_branch
switch_to_branch(branch=branch, apps=list(apps), upgrade=upgrade)
File “/home/naztech/bench/bench/app.py”, line 397, in switch_to_branch
switch_branch(branch, apps=apps, bench_path=bench_path, upgrade=upgrade)
File “/home/naztech/bench/bench/app.py”, line 383, in switch_branch
update_requirements()
File “/home/naztech/bench/bench/utils.py”, line 443, in update_requirements
install_app(app, bench_path=bench_path)
File “/home/naztech/bench/bench/app.py”, line 172, in install_app
find_links=find_links))
File “/home/naztech/bench/bench/utils.py”, line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/erpnext