It looks like you have a broken installation of Python. Can you check which version of Python have you installed on your system by running python3 -V Also, are you sure you’re using Ubuntu 22.04?
If it’s a case of broken Python install the I would suggest you to start with afresh on a new server instead of trying to fix the broken package as it will end up creating more issues in the future.
Glad to know that you could get your production servers up and running!
You are right here, the payments app currently has only the “develop” branch available. Same is the case with the HRMS app. May be we will get master branches of these apps (like we have for “ecommerce_integrations” app) in the future.
This guide is best suited for Ubuntu 22.04 as it comes with Python 3.10 as the default version from its repo. Ubuntu 20 used Python 3.6/3.8 depending on the repo availability. I would recommended to go with 22.04 for best compatibility.
Looks like some user permission related issue. Can you check the following?
Check if bench is installed correctly by running bench --version
Check the permissions on /home/frappe/[frappe-bench]/ directory by running ls -al and see if the frappe user has permissions on the frappe-bench directory. If it doesn’t then try running chown -R frappe:frappe /home/frappe
This step was required for v13 installation but for v14 it’s an optional step as we’re already setting it up the character encoding in /etc/mysql/my.cnf (some versions might still require it but it’s not mandatory now).
And something broke. wkhtmltopdf is now again creating wrong PDFs. They are cutted and zoomed in.
Any way to solve this problem? Creating good looking PDFs is important .
@shashank_shirke Thanks for you great instructions that have helped many.However i have not been luck to get V14 successfully installed on ubuntu 22.04.I have successfully followed the instruction to step 5.5.
When i carried out step 6.1 bench get-app payments, i got the following error:
frappe-bench$ bench get-app payments
A directory for the application ‘payments’ already exists. Do you want to continue and overwrite it? [y/N]: y
INFO: App moved from apps/payments to archived/apps/payments-2022-08-16
Getting payments
$ git clone GitHub - frappe/payments: A payments app for frappe --branch develop --depth 1 --origin upstream
Cloning into ‘payments’…
remote: Enumerating objects: 84, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 84 (delta 12), reused 36 (delta 4), pack-reused 0
Receiving objects: 100% (84/84), 41.21 KiB | 2.94 MiB/s, done.
Resolving deltas: 100% (12/12), done.
Ignoring dependencies of payments. To install dependencies use --resolve-deps
Installing payments
$ /home/fred/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/fred/frappe-bench/apps/payments
$ bench build --app payments
Linking /home/fred/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules Linking /home/fred/frappe-bench/apps/payments/payments/public to ./assets/payments Application Assets Linked
/home/fred/frappe-bench/apps/frappe/esbuild/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/provider.js:4:16)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: ‘MODULE_NOT_FOUND’,
requireStack: [
‘/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/provider.js’,
‘/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/async.js’,
‘/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/index.js’,
‘/home/fred/frappe-bench/apps/frappe/esbuild/esbuild.js’,
‘/home/fred/frappe-bench/apps/frappe/esbuild/index.js’
]
}
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/fred/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/fred/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/fred/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 82, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File “/home/fred/frappe-bench/apps/frappe/frappe/build.py”, line 257, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File “/home/fred/frappe-bench/apps/frappe/frappe/commands/init.py”, line 98, in popen
raise subprocess.CalledProcessError(return, command)
subprocess.CalledProcessError: Command ‘yarn run production --apps payments --run-build-command’ returned non-zero exit status 1.
ERROR:
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 127, in cli
bench_command()
File “/usr/lib/python3/dist-packages/click/core.py”, line 1128, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1053, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python3/dist-packages/click/core.py”, line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/core.py”, line 754, in invoke
return __callback(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/commands/make.py”, line 159, in get_app
get_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 432, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 230, in install
install_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 574, in install_app
build_assets(bench_path=bench_path, app=app)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 330, in build_assets
exec_cmd(command, cwd=bench_path, env={“BENCH_DEVELOPER”: “1”})
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 155, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError
It looks like you already had the payments app installed on your system. I suppose this is an existing server that you’re trying to install v14 on. Can you check the list of all your installed Frappe applications by running
bench version --format table
This should give you an output of all your existing apps with their version numbers.
Which version of Ubuntu are use using? It looks like your system is not able to find the package in its repository. Try running the below and see if it’s able to locate it;
Thanks for this guide! I’m a very newbie to ERPNext and came from a different ERP. Currently, i am testing ERPNext installed inside VirtualBox (via OVA). I wish to try this guide but not to use a separate computer running under Ubuntu, instead install it inside the VirtualBox. This is currently my idea on how to do this: download an ISO image of ubuntu, create a new virtual machine inside VirtualBox by copying the settings of my current ERPNext VM then follow your guide. Am i on the right path? Kindly give me some more guidance. By the way, which ubuntu should i use? desktop or server? Thanks!
Looks like some issue with your Redis server. I think the hrms app is already installed on your server. You can try running the bench --site site1.local install-app hrms command again and you should receive a message stating that the app is already installed. You can ignore the error message and continue with the rest of the steps.