I want to install ERPNext on my Local host

Sorry, the command is

bench frappe --restore 1bd3e0294d /home/erpadmin/frappe-bench/20150212_71442855_database.sql -f

i have to apply:

bench frappe --restore 1bd3e0294d /home/erpadmin/frappe-bench/20150212_71442855_database.sql -f

Again found on 127.0.0.1(localhost) : Internal server error
& ternminal status is given below:

erpadmin@ERPNEXT:~$ bench frappe --restore 1bd3e0294d /home/erpadmin/frappe-bench/20150212_71442855_database.sql -f
MySQL root password:
Created user 1bd3e0294d
Created database 1bd3e0294d
Granted privileges to user 1bd3e0294d and database 1bd3e0294d
Starting database import…
Imported from database /home/erpadmin/frappe-bench/20150212_71442855_database.sql
Traceback (most recent call last):
File “/home/erpadmin/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.12.1’, ‘console_scripts’, ‘frappe’)()
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/cli.py”, line 53, in main
return run(fn, parsed_args)
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/cli.py”, line 81, in run
out = globals().get(fn)(*args.get(fn), **args)
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/cli.py”, line 67, in new_fn
return fn(*args, **new_kwargs)
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/cli.py”, line 386, in restore
_install(db_name, source_sql=source_sql, quiet=quiet, force=force)
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/cli.py”, line 319, in _install
install_app(“frappe”, verbose=verbose, set_as_patched=not source_sql)
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/installer.py”, line 92, in install_app
frappe.clear_cache()
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/init.py”, line 291, in clear_cache
for fn in frappe.get_hooks(“clear_cache”):
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/init.py”, line 464, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/memc.py”, line 21, in get_value
val = builder()
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/init.py”, line 441, in load_app_hooks
app_hooks = get_module(app + “.hooks”)
File “/home/erpadmin/frappe-bench/apps/frappe/frappe/init.py”, line 379, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
ImportError: No module named frappe_subscription.hooks
erpadmin@ERPNEXT:~$

The command is correct!

However the “ImportError: No module named frappe_subscription.hooks” was a bug we fixed a while back.
Do,

Run,

bench update --pull
bench frappe --restore 1bd3e0294d /home/erpadmin/frappe-bench/20150212_71442855_database.sql -f

Gr8 again thanks you very much. – provided command finished the all my database restoreing problem. Thanks again.

1 Like

hi Gurus !
I 'm doing the same , i have downloaded the virtual machine from erpnext.com/download imported in virtual box … now try to restore by .sql file taken from cloud . but getting following error …

erpnext@erpnext-vm:~/frappe-bench$ bench frappe --restore yh2hwev8eelhxa7o /home/test/database.sql -f
Traceback (most recent call last):
File “/home/erpnext/frappe-bench/env/bin/frappe”, line 5, in
from pkg_resources import load_entry_point
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources.py”, line 2701, in
parse_requirements(requires), Environment()
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources.py”, line 572, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: frappe==4.0.0

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 36
Server version: 5.5.40-MariaDB-1~wheezy-log mariadb.org binary distribution

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| erpnext |
| mysql |
| performance_schema |
±-------------------+
4 rows in set (0.02 sec)

MariaDB [(none)]>

pkg_resources.DistributionNotFound: frappe==4.0.0 , I think this is the major problem … please help !

Please post on new thread.