Is there a way to make an offline installation of ERPNext?

Is there a way to install bench, frappe and ERPNext when are downloaded manually? I want to make an offline installation without using “bench get-app” online.

I had manually downloaded all of the 3 tar.gz files and I untar/unzip them.

When I execute “pip install -e bench-repo” there is not problem, but in the final step when I try to install with " bench --site mysite install-app erpnext" I get this error: “Not find app ERPNext”.

I manually put the name of the app “ERPNext” into frappe-bench/sites/apps.txt file.

Is it needed to setup some file for fixing the error?

I want to install ERPNext 7. I tried with version 8 (offline too) and I get the same error.

Thanks in advanced for all your help.

You need to do bench get-app atleast once. After that you can install it multiple sites even when you are offline.

Hi @netchampfaris

When I run “bench get-app”, it downloads the latest version of ERPNext. Is there som file that get-app configures when it is executed that command?

I would like to install any version of ERPNext. Is there a way to install directly the version I want?

Thanks

I don’t think there is such a command at the moment.

@fabyc get-app just calls a git repo, just configure git to serve locally - (I think a folder path will also do)

Hi @rmehta ,

Following in testing of trying to install ERPNext v7, I made these steps:

Created a new bench:
bench init frappe-bench && cd frappe-bench

New site:
bench new-site site1

Download to version 7.2.31 of frappe (apps/frappe)
git reset --hard df1347d5f10bc169d241d46a75bf6041b5febe12

I copied erpnext 7.2.32 (downloaded manually) to apps/erpnext dir

I executed: env/bin/pip install -q -e apps/erpnext --no-cache-dir

I added erpnext to the file: apps.txt (dir /frappe-bench/sites)

Then, when I run the command [1] I get this error [2]. I hope you can give me an idea about how can I do.

Thanks in advanced

[1]
bench --site site1 install-app erpnext

[2]

Updating DocTypes for erpnext : [=== ]Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “frappe-bench/apps/frappe/frappe/commands/site.py”, line 153, in install_app
_install_app(app, verbose=context.verbose)
File “frappe-bench/apps/frappe/frappe/installer.py”, line 135, in install_app
sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
File “frappe-bench/apps/frappe/frappe/model/sync.py”, line 45, in sync_for
reset_permissions=reset_permissions)
File “frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 58, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 129, in import_doc
doc.insert()
File “frappe-bench/apps/frappe/frappe/model/document.py”, line 220, in insert
self.run_post_save_methods()
File “frappe-bench/apps/frappe/frappe/model/document.py”, line 790, in run_post_save_methods
self.run_method(“on_update”)
File “frappe-bench/apps/frappe/frappe/model/document.py”, line 667, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “frappe-bench/apps/frappe/frappe/model/document.py”, line 890, in composer
return composed(self, method, *args, **kwargs)
File “frappe-bench/apps/frappe/frappe/model/document.py”, line 873, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 205, in on_update
self.run_module_method(“on_doctype_update”)
File “frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 254, in run_module_method
module = load_doctype_module(self.name, self.module)
File “frappe-bench/apps/frappe/frappe/modules/utils.py”, line 184, in load_doctype_module
raise ImportError, ‘Module import failed for {0} ({1})’.format(doctype, module_name)
ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request)

“Is there a way to install bench, frappe and ERPNext when are downloaded manually? I want to make an offline installation without using “bench get-app” online.”

Another option is to an ‘offline install’ is to download a VM instance https://erpnext.com/download