Erpnext 14 Installation DEVELOPMENT & PRODUCTIONS [UBUNTU/SERVER 22.04]

You watched video?

yes of course

@Usman_Ali,

I solved the error:

**error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560**

by going to:

sudo nano /etc/supervisor/supervisord.conf

(Add these lines under [unix_http_server])

chmod=0760
chown=frappe:frappe
1 Like

Go through with proper steps. Never will be any error.

@MohamedAbdulsalam Try this

2 Likes

from this

bench switch-to-branch version-13 --upgrade frappe erpnext
bench update --patch
1 Like

Assalam o alikum brother Usman Ali,
i m a beginner and using your way to setup an erpnext 14 on ubuntu 22.04lts from my windows OS
i m using virtual machine version 7 and installing ubuntu 22.04lts and then installing ernext whith your guide
i totally using the same steps which you have mentioned here but i m getting this error again and again
the local host is up and i m getting this error on my link page.


please let me know what mistake i m doing and how can i resolve it
1 question can i use windows 11 terminal to install erpnext or ubuntu is compulsory

Walaikum salam. In windows cant use because no services will run. Use linux VM is best. Please see video also. May be it helps. As this method is used so many times without any error.

This ia seems your user permissions error. Check your users and passwords as guide.

i m using virtual box virtual machine and installing ubuntu 22.04lts in windows 11
try 1 time more and give you the response
thanks

assalam o alaikum
brother
i started again i installed erpnext but i m in frappe my erp next is not working


this is erpnext steps
i installed erpnext again but i m still over there

Just go through the whole guide.

Error when doing bench init frappe-bench

`frappe@rtos:~$ bench init --frappe-branch version-14 frappe-bench
Setting Up Environment
$ python3 -m venv env
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet wheel
Getting frappe
$ git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-14 --depth 1 --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 3164, done.
remote: Counting objects: 100% (3164/3164), done.
remote: Compressing objects: 100% (2839/2839), done.
remote: Total 3164 (delta 426), reused 1258 (delta 226), pack-reused 0
Receiving objects: 100% (3164/3164), 15.99 MiB | 10.56 MiB/s, done.
Resolving deltas: 100% (426/426), done.
Installing frappe
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/frappe
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
/home/frappe/frappe-bench/env/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “/tmp/pip-install-qp99aqvf/cairocffi_ee013df79cae4892a7217e212cd917ef/setup.py”, line 10, in
setup(
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/setuptools/init.py”, line 153, in setup
return distutils.core.setup(**attrs)
File “/usr/lib/python3.10/distutils/core.py”, line 108, in setup
_setup_distribution = dist = klass(attrs)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/setuptools/dist.py”, line 459, in init
_Distribution.init(
File “/usr/lib/python3.10/distutils/dist.py”, line 292, in init
self.finalize_options()
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/setuptools/dist.py”, line 837, in finalize_options
ep(self)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/setuptools/dist.py”, line 858, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File “/tmp/pip-install-qp99aqvf/cairocffi_ee013df79cae4892a7217e212cd917ef/.eggs/cffi-1.15.1-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py”, line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File “/tmp/pip-install-qp99aqvf/cairocffi_ee013df79cae4892a7217e212cd917ef/.eggs/cffi-1.15.1-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py”, line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File “/tmp/pip-install-qp99aqvf/cairocffi_ee013df79cae4892a7217e212cd917ef/.eggs/cffi-1.15.1-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py”, line 25, in execfile
exec(code, glob, glob)
File “cairocffi/ffi_build.py”, line 26, in
ffi = FFI()
File “/tmp/pip-install-qp99aqvf/cairocffi_ee013df79cae4892a7217e212cd917ef/.eggs/cffi-1.15.1-py3.10-linux-x86_64.egg/cffi/api.py”, line 48, in init
import _cffi_backend as backend
ImportError: /tmp/pip-install-qp99aqvf/cairocffi_ee013df79cae4892a7217e212cd917ef/.eggs/cffi-1.15.1-py3.10-linux-x86_64.egg/_cffi_backend.cpython-310-x86_64-linux-gnu.so: failed to map segment from shared object
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/bench/commands/make.py”, line 68, in init
init(
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/system.py”, line 79, in init
get_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 444, 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 242, in install
install_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 573, in install_app
bench.run(
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: y
`

bench init frappe --verbose --frappe-branch v14.20.0

@Usman_Ali

This causes problems for future updates as the local branch will be inconsistent with the remote active branch when trying to update as v.14.20.0 is a fixed update tag. The optimal command to use in this instance will be bench init frappe --verbose --frappe-branch version-14.

I get this error while setting up production. Can anyone help please.

Port configuration list:

Site site1.local assigned port: 80
Setting Up symlinks and reloading services…
$ /usr/bin/supervisorctl reread
No config updates to processes
$ /usr/bin/supervisorctl update
$ sudo /usr/sbin/nginx -t
nginx: [emerg] open() “/etc/nginx/conf.d/frappe.conf” failed (2: No such file or directory) in /etc/nginx/nginx.conf:75
nginx: configuration file /etc/nginx/nginx.conf test failed
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 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/setup.py”, line 108, in setup_production
setup_production(user=user, yes=yes)
File “/usr/local/lib/python3.10/dist-packages/bench/config/production_setup.py”, line 87, in setup_production
reload_nginx()
File “/usr/local/lib/python3.10/dist-packages/bench/config/production_setup.py”, line 205, in reload_nginx
exec_cmd(f"sudo {which(‘nginx’)} -t")
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

Hello, which tutorial did you have use?

if anyone is having issues with bench update:

Getting new error while installing Payments App

Installing payments
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/payments 
ERROR: Could not find a version that satisfies the requirement braintree~=4.8.0 (from payments) (from versions: 1.0.0, 1.1.0, 1.2.0, 2.0.0, 2.1.0, 2.2.1, 2.3.0, 2.4.0, 2.4.1, 2.5.0, 2.6.0, 2.6.1, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.14.0, 2.14.1, 2.14.2, 2.15.0, 2.16.0, 2.17.0, 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.23.1, 2.24.0, 2.24.1, 2.25.0, 2.25.1, 2.26.0, 2.27.0, 2.28.0, 2.29.0, 2.29.1, 3.0.0, 3.1.0, 3.1.1, 3.2.0, 3.3.0, 3.4.0, 3.4.1, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 3.11.1, 3.12.0, 3.13.0, 3.14.0, 3.15.0, 3.16.0, 3.17.0, 3.18.0, 3.19.0, 3.20.0, 3.21.0, 3.22.0, 3.23.0, 3.24.0, 3.25.0, 3.26.1, 3.27.0, 3.28.0, 3.29.0, 3.29.1, 3.29.2, 3.30.0, 3.31.0, 3.32.0, 3.33.0, 3.34.0, 3.35.0, 3.37.0, 3.37.1, 3.37.2, 3.38.0, 3.39.0, 3.39.1, 3.40.0, 3.41.0, 3.42.0, 3.43.0, 3.44.0, 3.45.0, 3.46.0, 3.47.0, 3.48.0, 3.49.0, 3.50.0, 3.51.0, 3.52.0, 3.53.0, 3.54.0, 3.55.0, 3.56.0, 3.57.1, 3.58.0, 3.59.0, 3.59.1, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0, 4.11.0, 4.12.0, 4.13.0, 4.13.1, 4.14.0, 4.15.2, 4.16.0, 4.17.0, 4.17.1, 4.18.0, 4.18.1, 4.19.0, 4.20.0)
ERROR: No matching distribution found for braintree~=4.8.0
ERROR: /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/payments 
subprocess.CalledProcessError: Command '/home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/payments ' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/update.py", line 59, in update
    update(
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 446, in update
    bench.setup.requirements()
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 105, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 464, in requirements
    app = App(path_to_app, bench=self.bench, to_clone=False).install(
  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 242, in install
    install_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 573, in install_app
    bench.run(
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 48, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 158, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/payments 
sudo pip3 install braintree~=4.8.0
ERROR: Could not find a version that satisfies the requirement braintree~=4.8.0 (from versions: 1.0.0, 1.1.0, 1.2.0, 2.0.0, 2.1.0, 2.2.1, 2.3.0, 2.4.0, 2.4.1, 2.5.0, 2.6.0, 2.6.1, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.14.0, 2.14.1, 2.14.2, 2.15.0, 2.16.0, 2.17.0, 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.23.1, 2.24.0, 2.24.1, 2.25.0, 2.25.1, 2.26.0, 2.27.0, 2.28.0, 2.29.0, 2.29.1, 3.0.0, 3.1.0, 3.1.1, 3.2.0, 3.3.0, 3.4.0, 3.4.1, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 3.11.1, 3.12.0, 3.13.0, 3.14.0, 3.15.0, 3.16.0, 3.17.0, 3.18.0, 3.19.0, 3.20.0, 3.21.0, 3.22.0, 3.23.0, 3.24.0, 3.25.0, 3.26.1, 3.27.0, 3.28.0, 3.29.0, 3.29.1, 3.29.2, 3.30.0, 3.31.0, 3.32.0, 3.33.0, 3.34.0, 3.35.0, 3.37.0, 3.37.1, 3.37.2, 3.38.0, 3.39.0, 3.39.1, 3.40.0, 3.41.0, 3.42.0, 3.43.0, 3.44.0, 3.45.0, 3.46.0, 3.47.0, 3.48.0, 3.49.0, 3.50.0, 3.51.0, 3.52.0, 3.53.0, 3.54.0, 3.55.0, 3.56.0, 3.57.1, 3.58.0, 3.59.0, 3.59.1, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0, 4.11.0, 4.12.0, 4.13.0, 4.13.1, 4.14.0, 4.15.2, 4.16.0, 4.17.0, 4.17.1, 4.18.0, 4.18.1, 4.19.0, 4.20.0)
ERROR: No matching distribution found for braintree~=4.8.0
sudo pip3 install braintree
Collecting braintree
  Downloading braintree-4.20.0-py2.py3-none-any.whl (137 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.6/137.6 KB 2.4 MB/s eta 0:00:00
Requirement already satisfied: requests<3.0,>=0.11.1 in /usr/lib/python3/dist-packages (from braintree) (2.25.1)
Installing collected packages: braintree
Successfully installed braintree-4.20.0
bench start
3:46:17 schedule.1       | ModuleNotFoundError: No module named 'payments'