Easy install setup guide for erpnext installation on Ubuntu 20.04 LTS. With some modification of course

Hello friends,

This is my first post on this forum.

I was struggling to install ERPNEXT with easy install method. I almost spend 3-4 days to know why it is not working finally with lots of tweaks and turns i managed to install it. (Thanks to the lockdown i was able to spare the time to troubleshoot the issue in detail.)

  1. Fresh installation of Ubuntu 20.04

  2. Creations of user with sudo rights.

     sudo adduser *Your_USERNAME* 
     sudo usermod -aG sudo *Your_USERNAME*
  1. Use this cmd to get your install.py
wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
  1. Updating the install.py in order to support Ubuntu 20.04, by default the script is made for Ubuntu <=18.04.
    By the way with ubuntu 20.04 python 3.8 comes installed. And hence the platform.dist() is no more supported by the python3.8.

To help the installation we have to do the following modifications in the install.py,

On line 81 : Change 'ubuntu’: [14, 15, 16, 18, 19], to ‘ubuntu’: [14, 15, 16, 18, 19, 20],
On line 100 : Change current_dist = platform.dist() to current_dist = [“Ubuntu”, “20.04”]

This will get you started with installation.

  1. Always install it with --verbose on to know where the problem is occurring.

The famous “returned non-zero exit status 1” error will bother you but don’t worry --verbose will tell you why this is not working.

In my case I used following cmd : sudo python3 install.py --production --user Your_USERNAME --mariadb-version 10.5 --verbose

Note mariadb version 10.5 was used since default 10.2 is not supported by ubuntu 20.04

Lot of people is having this error but nobody was able to knows where does this error come from. Thanks to --verbose it will help troubleshooting.

In my case i had to tweak the following files to make it through.

Note : Every time the installation fails solve the error and rerun the sudo python3 install.py --production --user Your_USERNAME --mariadb-version 10.5 --verbose

Most of the errors were coming from playbooks

  1. If you get libssl error.

Since libssl1.0-dev is not supported by Ubuntu 20.04 you need to do following.

go to /tmp/ .bench/playbooks/roles/common/tasks/ubuntu.yml

sudo nano ubuntu.yml

Line 36 : Change from - libssl1.0-dev to - libssl1.1

Again libssl1.0 does not support ubuntu 20.04. Ubuntu 20.04 comes installed with libssl1.1, if not install it.

  1. If you get Nodejs error, “Error mentioning no supported version found for the distribution”

Nodejs version 12.x works with ubuntu20.04. We need to fix playbook for this.

go to /tmp/ .bench/playbooks/roles/nodejs/tasks/ debian_family.yml

sudo nano debian_family.yml

Line 6 : Change from - “curl --silent --location https://deb.nodesource.com/setup_{{ node_version }}.x | bash -”
TO “curl --silent --location https://deb.nodesource.com/setup_12.x | bash -”

Line 8 : Change from - name: Install nodejs {{ node_version }}


- name: Install nodejs 12


go to /tmp/ .bench/playbooks/roles/nodejs/tasks/ redhat_family.yml

sudo nano redhat_family.yml

Line 6 : Change from “curl --silent --location https://rpm.nodesource.com/setup_{{ node_version }}.x | sudo bash -”
TO “curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -”

Line 8 : Change from - name: Install node v{{ node_version }}
TO - name: Install node v12

  1. If you get wkhtmltopdf error.

Then go to https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
download the wkhtmltox_0.12.5-1.focal_amd64.deb file rename it to wkhtmltox.deb

And the copy or move this file to /tmp folder.

I am not a professional coder so any mistakes or wrong way of doing things in above method should be highlighted and your feedback is appreciated.

  1. If you face ModuleNotFoundError: No module named ‘erpnext .

Follow this https://medium.com/@binodpaneru23/setting-up-erpnext-in-mac-os-c475466f5403

Based on this doc I used

frappe-bench/env/bin/pip3 install -U -e ./apps/erpnext

Thanks @arun992 for steps 5 and 6

  1. if you get stuck with Cython is required to compile pandas from a development branch. error.
    Check this post [Bench installation of erpnext fails on pandas setup if numpy>=1.19.0 · Issue #22424 · frappe/erpnext · GitHub]

Based on this doc use the following commands:

frappe-bench/env/bin/pip3 install pandas==0.24.2
frappe-bench/env/bin/pip install numpy==1.18.5

After this use

frappe-bench/env/bin/pip3 install -U -e ./apps/erpnext

Oncef inished the erpnext installationcontinue with the command

sudo frappe-bench/env/bin/python3 temp --production --user frappe --mariadb-version 10.5 --verbose

Hope this will help people to enjoy the sweet fruit of ERPNEXT.


That’s awesome work. Thank you for these useful steps.

Thanks for the guide, but not sure why I can’t setup on first login.

Hi adamtang79,

Just refresh the page again you are good to go…

Let me know if you are facing any problems after that.


For all those who are interested…

For ubuntu 20.04 I have forked the install.py a little and using distro module instead of platform.dist().

My install.py you can download from the link below :


This install script you don’t have to patch anything it should work out of box.

  1. Copy this install.py file in the home directory.

  2. install Distro module for python.

Sudo pip install distro

  1. Then execute the easy setup install.py with sudo python3 install.py --production --user Your_USERNAME --mariadb-version 10.5 --verbose


1 Like

Hi Thanks Nikunj_Patel. After refreshed, it asked to restarted the setup process. This time I get below message.

And stuck at here.

Now it’s better than months ago. But I’m still feeling unstable about erpnext.

After refresh the page, my new user can’t access to the desk. I tried logout and login using administrator and it asked for setup again but this time i saw top left desk icon and after i clicked desk icon, i see erpnext dashboard. After a few clicks browsing page, the setup dialog gone.

Hi adamtang79,

You need to start for the first time as Administrator user.

The password of which you might have entered during the easy install.py setup.

Once you login as Administrator finish the setup you can login as other user.

Hope this will solve your problem.


I agree with you @adamtang79 but most of the time it is just that we follow wrong steps.

I was struggling before. But now I am able to install ERPNEXT almost in first trial on Ubuntu18.04 and 16.04. And for ubuntu 20.04 as I have mentioned i have fork some files to get it done, but it works after that.

My suggestion keep trying. You will get through… :blush:

Hi @adamtang79,

Try bench restart and then do the setup as Administrator user.

Hi @Nikunj_Patel,

I wish to know whether you have first time setup problem like me?

I don’t have this first time setup stuck before v12.

Thanks Bro.


Is it possible for you to give me remote access to your local development ?

I am not an expert but lets try and fix it together I will learn something new… :blush:

Hi @Nikunj_Patel,

I’m using virtualbox with bridged network. May be teamviewer?


yes i have teamviewer 13… it is old but it is licensed…so i didnt want to upgrade. Can you install version 13…

Thanks @Nikunj_Patel for education guide and helps. It is working now.

Hi Nikunj,

Which version of install.py did you fork? From the master or develop branch?

I’d like to keep this as a diff in a git tree for easier tracking.



You can follow the following pull request :

currently we are working on merging this changes into develop branch.

Let me know if you need more info.


Thanks Nikunj. Very helpful.

I cloned your tree and I think the following branches: patch-1, patch-2 and patch-3 are all required to get this working correctly. Am I right?

It seems the easy_install CI job failed with this branch. Not sure if it is related, from a cursory glance.

bench setup lets-encrypt site.com is still python 2.7 based. So, http may be ok with this setup but unless python 2.7 can be installed in unbuntu 20, lets-encrypt bench command cannot be used.

Hi Joseph,

Can you attach some error message? I just ran 2to3 on bench/commands/setup.py, util.py and bench/config/lets_encrypt.py and it only came back with a couple of print fixes.