Easiest & Simple Way to Install ERPNext 13

Tried the commands but I am getting below error, please suggest.Thx

frappe@v13-new:~$ sudo pip3 install -e /home/user/.bench/
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
ERROR: /home/user/.bench/ is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

You ran the wrong command here. You were supposed to change the user bit of the code to your username which I assume is frappe from your traceback. so the correct command should be:

sudo pip3 install -e /home/frappe/.bench/

if your user is not frappe, change it to the correct user name.

1 Like

you are right that’s a very silly mistake I did…

Thanks a TON!! @flexy2ky !

i am new with Ubuntu, got same problem as you did. successed. only thing i did is to reboot after the update and upgrade in case of error, thanks for your same problem:rofl::rofl:

1 Like

Thank You
This Fix my Error returned non-zero exit status 2
after spending 3 hours searching the forum I found your great easy solution
thankyou again

Hi Members,
I have used the exact steps before and it worked like a charm.
Today I have encountered same error 3 times using different servers. Debian 10 and Ubuntu 20.04 LTS. Please help anyone if possible. I think it is a compatibility issue with recent updates.

Error logs are below:

TASK [bench : python3 bench init for production] ***************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:44
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp”&& mkdir /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342 && echo ansible-tmp-1642495545.8854184-47007-93725733107342=“echo /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342” ) && sleep 0’
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-30352lvc4iit5/tmpngmls08j TO /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:petsmall:r-x /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘chmod u+x /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘chown petsmall /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u petsmall /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-hzejkhmxxhkufqkxrqdicuhxqelfnfxq ; /usr/bin/python3 /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“init”,
“/home/petsmall/frappe-bench”,
“–frappe-path”,
GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”,
“–frappe-branch”,
“version-13”,
“–python”,
“python3”
],
“delta”: “0:00:00.199411”,
“end”: “2022-01-18 14:15:46.208080”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench init /home/petsmall/frappe-bench --frappe-path GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --frappe-branch version-13 --python python3”,
“_uses_shell”: false,
“argv”: null,
“chdir”: null,
“creates”: “/home/petsmall/frappe-bench”,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2022-01-18 14:15:46.008669”,
“stderr”: “Traceback (most recent call last):\n File "/usr/bin/bench", line 33, in \n sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())\n File "/usr/bin/bench", line 22, in importlib_load_entry_point\n for entry_point in distribution(dist_name).entry_points\n File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution\n return Distribution.from_name(distribution_name)\n File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name\n raise PackageNotFoundError(name)\nimportlib.metadata.PackageNotFoundError: frappe-bench”,
“stderr_lines”: [
“Traceback (most recent call last):”,
" File "/usr/bin/bench", line 33, in ”,
" sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())“,
" File "/usr/bin/bench", line 22, in importlib_load_entry_point”,
" for entry_point in distribution(dist_name).entry_points",
" File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution",
" return Distribution.from_name(distribution_name)“,
" File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name”,
" raise PackageNotFoundError(name)",
“importlib.metadata.PackageNotFoundError: frappe-bench”
],
“stdout”: “”,
“stdout_lines”: []
}

PLAY RECAP *****************************************************************************************************************
localhost : ok=67 changed=40 unreachable=0 failed=1 skipped=63 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 497, in
install_bench(args)
File “install.py”, line 278, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 413, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=petsmall’]’ returned non-zero exit status 2.

@Sukanta_Rakshit

Unable to install ERPNext on Ubuntu 18.04

Hope this helps!

Please see this thread

https://github.com/frappe/bench/issues/1240

1 Like

@mohsininspire Thank You So Much :slight_smile: :slight_smile:
This was the exact solution.

If anyone have the same problem refer the Bug above or use the below commands:
sudo pip3 uninstall setuptools
sudo pip3 install setuptools==59.6.0
sudo pip3 install -e /home/erp/.bench/

Don’t forget to change /home/[your-username]/.bench/

1 Like

Hello, do you mentioned above Oracle Instance works erpnext. What OCI instances type uses?, what script uses or if requiered any modification to make to works.

Thanks

EDIT: I follow all steps mentioned above + open network ports an OCI + open ports in ubuntu + lastest solutions here posted and works fine!!

Try this. Could solve the problem with ansible-playbook error.

Thanks for the installation guide. The installation was successful but the site won’t open. I am getting the following error page.

This site can’t be reached
The connection was reset.

Pleas help

The problem is with the supervisor service.

This doesnt work for me. I got the following error from the last command

I had to run the following with sudo
$sudo python3 install.py --verbose --production --user frappe --frappe-branch version-13 --erpnext-branch version-13
Got the following error

Traceback (most recent call last):
File “install.py”, line 497, in
install_bench(args)
File “install.py”, line 278, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 413, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2.

So I ran

$sudo pip3 uninstall setuptools
$sudo pip3 install setuptools==59.6.0
$sudo pip3 install -e /home/frappe/.bench/

/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
ERROR: /home/frappe/.bench/ is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

Anything I am missing something?

You are indeed missing something.

there was no need to specify –user frappe in your install command as this is the default user it installs to if you do not specify a different user. I realise that sometimes using the --user tag throws errors in some distros especially if you’re installing on a VPS and don’t apply the right permissions to logged in user. So I suggest you run the install command without the --user tag and if it breaks afterwards, use the setup tools fix to replace the setup tools installed.

I am installing it on a new VM on my local PC Ubuntu 20.

I have removed the user tag and still the same error.
should I try uninstalling python 3.8 and use with python 3.7 ?

Hi All,

I managed to install ERPnext 13 on a Oracle arm64 server (that too in a LXC container) without much hassle. I will try to make a full guide in the coming weeks, but if someone wants to try now than please do this:

I followed the steps highlighted here: How to deploy ERPNext 13 on Ubuntu 20.04 LTS (Focal Fossa) | Scaleway Documentation and just changed amd64 to arm64 for the instructions to install wkhtmltopdf.

There was a few errors, but the markupsafe error was resolved by sudo pip uninstall MarkupSafe and then installing other version sudo pip install markupsafe==2.0.1 (source: Error while creating new-site - ERPNext - ERPNext Forum)

I haven’t checked the installation yet, but so far seems ok. Hope this helps.

1 Like

I haven’t checked the script yet since I spent hell lot of time doing the implementation on WSL and what now.

But for this script, for me, it was able to launch ‘bench init …’ command. I read through the ansible logs and found out “frappe-bench” wasn’t installed. Simply installed it via pip and it got through

Edit: ‘bench’ commands are not working through ansible playbook, after bench init, bench get-app failed too.

P.S: Not an issue, can be solved by manually executing failed commands

Hi everyone, as I mentioned I will be sharing step by step installation guide for ERPNext. Using these steps I have done more than 30 installations without error. So I have provided the step-by-step guide in this article.

3 Likes

I followed carefully your steps:

  • Step 11 needs to be run with sudo maybe you want to update the command.
  • The script fails after setting both passwords.

Traceback (most recent call last):
File “install.py”, line 497, in
install_bench(args)
File “install.py”, line 278, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 413, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=my_user’]’ returned non-zero exit status 2.

Any ideas why?