Production setup is not working

Hi, I am using this link Production Setup for setup production environment. but after it return me this error-

ERROR: bench 5.0.0 has requirement setuptools==40.8.0, but you’ll have setuptools 49.2.0 which is incompatible.

Please help


May we know the operating platform you are installing in?

Using Ubuntu 18.04 and the easy install script instructions have been working for me.

I am using ubuntu 16.04

It’s not that hard

run bench setup requirements. If you need extra help, DM me

Hi @mymi14s Thanks It worked but I am facing new issue that is subprocess.calledprocesserror: command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=ankit’]’ returned non-zero exit status 2

Can anyone please help me out.

Check the python version you’re using

It should be 3+

Else migrate to 3.7

sudo pip install ansible

Hi @mymi14s, What if I have only file and no environment.

It will create an environment for you. Go the the folder where you run bench

I am following these steps- GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
Where am I doing wrong

In frappe bench there is env, I just activated it using source/bin/activate and then install pip install ansible and installed successfully.
After that I did run sudo python3 then It prompts this----

Logs are saved under /tmp/logs/easy-install__2020-08-14__12-09.log
Checking System Compatibility…
ubuntu 16 is compatible!
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
Input MySQL and Frappe Administrator passwords:
Passwords saved at ~/passwords.txt
Traceback (most recent call last):
** File “”, line 437, in **
** install_bench(args)**
** File “”, line 241, in install_bench**
** run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)**
** File “”, line 362, in run_playbook**
** success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’), stdout=log_stream, stderr=sys.stderr)**
** File “/usr/lib/python3.5/”, line 581, 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=ankit’]’ returned non-zero exit status 2

Install ansible as global
sudo pip install ansible

Reset your os

After wget

sudo adduser myfrappe

sudo usermod -aG sudo myfrappe

sudo python3 --production --user myfrappe --verbose

I’ve been stuck onto this issue for several days now on mac & ubuntu:

ERROR! Unexpected Exception, this is probably a bug: cannot import name ‘AnsibleCollectionLoader’ from ‘ansible.utils.collection_loader’ (/usr/local/lib/python3.8/dist-packages/ansible/utils/collection_loader/

ERROR: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘{“production”: true, “admin_emails”: “”, “mysql_root_password”: null, “container”: false}’, ‘-t’, ‘fail2ban’]’ returned non-zero exit status 250.

File “/usr/lib/python3.8/”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘{“production”: true, “admin_emails”: “”, “mysql_root_password”: null, “container”: false}’, ‘-t’, ‘fail2ban’]’ returned non-zero exit status 250.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)()
File “/home/ubuntu/Desktop/Projects/MyProject/FE/bench-repo/bench/”, line 121, in cli

any inputs would be really helpful.

I got to resolve this issue by doing/following this:

but now, I’m facing this issue: KeyError: “getpwnam(): name not found: ‘erpnext’”

1 Like

Thanks Saru. I followed the advice in this comment:

and got it working by doing:

sudo python3 -m pip uninstall ansible ansible-base ansible-core

sudo python3 -m pip install ansible==2.8