Bench installation fails - Ubuntu 18.04

I’m following the manual installation guide for putting ERPNext on my Ubuntu 18.04 server. This is a base install running nothing else
I have got to the point of bench init <benchname> and I get this:

~$ bench init frappe-bench

Command 'bench' not found, but can be installed with:

sudo apt install ruby-active-model-serializers

I get the same response with bench --version.

How can I debug this further? What is causing the bench install to fail, but appear like it’s OK to pip?

Here’s the previous terminal text from git clone onwards.

ubuntu@ip-xxx-xxx-xxx-xxx:~$ git clone https://github.com/frappe/bench
Cloning into 'bench'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 6037 (delta 7), reused 7 (delta 3), pack-reused 6018
Receiving objects: 100% (6037/6037), 29.66 MiB | 18.81 MiB/s, done.
Resolving deltas: 100% (3852/3852), done.
ubuntu@ip-xxx-xxx-xxx-xxx:~$ pip install -e ./bench
Obtaining file:///home/ubuntu/bench
Collecting Click (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
    100% |████████████████████████████████| 81kB 2.8MB/s 
Collecting GitPython==2.1.11 (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/fe/e5/fafe827507644c32d6dc553a1c435cdf882e0c28918a5bab29f7fbebfb70/GitPython-2.1.11-py2.py3-none-any.whl (448kB)
    100% |████████████████████████████████| 450kB 2.6MB/s 
Collecting honcho (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/12/c2/95faf9e062e37f50fb685972692395bef019a554c08447282a81e35bf031/honcho-1.0.1-py2.py3-none-any.whl
Collecting jinja2 (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
    100% |████████████████████████████████| 133kB 8.5MB/s 
Collecting python-crontab (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/66/88/4f443440230dd28158bac16dcccd8c9834cee55845bf83e85550d2e389ac/python-crontab-2.3.5.tar.gz (44kB)
    100% |████████████████████████████████| 51kB 11.1MB/s 
Collecting requests (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl (57kB)
    100% |████████████████████████████████| 61kB 10.0MB/s 
Collecting semantic_version (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/72/83/f76958017f3094b072d8e3a72d25c3ed65f754cc607fdb6a7b33d84ab1d5/semantic_version-2.6.0.tar.gz
Collecting virtualenv (from bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/7c/17/9b7b6cddfd255388b58c61e25b091047f6814183e1d63741c8df8dcd65a2/virtualenv-16.1.0-py2.py3-none-any.whl (1.9MB)
    100% |████████████████████████████████| 1.9MB 628kB/s 
Collecting gitdb2>=2.0.0 (from GitPython==2.1.11->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/da/30/a407568aa8d8f25db817cf50121a958722f3fc5f87e3a6fba1f40c0633e3/gitdb2-2.0.5-py2.py3-none-any.whl (62kB)
    100% |████████████████████████████████| 71kB 9.3MB/s 
Collecting MarkupSafe>=0.23 (from jinja2->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/bc/3a/6bfd7b4b202fa33bdda8e4e3d3acc719f381fd730f9a0e7c5f34e845bd4d/MarkupSafe-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting python-dateutil (from python-crontab->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl (225kB)
    100% |████████████████████████████████| 235kB 368kB/s 
Collecting idna<2.8,>=2.5 (from requests->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 4.3MB/s 
Collecting urllib3<1.25,>=1.21.1 (from requests->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
    100% |████████████████████████████████| 122kB 5.6MB/s 
Collecting certifi>=2017.4.17 (from requests->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/56/9d/1d02dd80bc4cd955f98980f28c5ee2200e1209292d5f9e9cc8d030d18655/certifi-2018.10.15-py2.py3-none-any.whl (146kB)
    100% |████████████████████████████████| 153kB 7.6MB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 8.2MB/s 
Collecting smmap2>=2.0.0 (from gitdb2>=2.0.0->GitPython==2.1.11->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/55/d2/866d45e3a121ee15a1dc013824d58072fd5c7799c9c34d01378eb262ca8f/smmap2-2.0.5-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil->python-crontab->bench==4.1.0)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Building wheels for collected packages: python-crontab, semantic-version
  Running setup.py bdist_wheel for python-crontab ... done
  Stored in directory: /home/ubuntu/.cache/pip/wheels/fb/92/07/ee1918fa370be1c495aba19d219ad4e1c218846ecceb2622af
  Running setup.py bdist_wheel for semantic-version ... done
  Stored in directory: /home/ubuntu/.cache/pip/wheels/60/bb/50/215d669d31f992767f5dd8d3c974e79261707ee7f898f0dc10
Successfully built python-crontab semantic-version
Installing collected packages: Click, smmap2, gitdb2, GitPython, honcho, MarkupSafe, jinja2, six, python-dateutil, python-crontab, idna, urllib3, certifi, chardet, requests, semantic-version, virtualenv, bench
  Running setup.py develop for bench
Successfully installed Click-7.0 GitPython-2.1.11 MarkupSafe-1.1.0 bench certifi-2018.10.15 chardet-3.0.4 gitdb2-2.0.5 honcho-1.0.1 idna-2.7 jinja2-2.10 python-crontab-2.3.5 python-dateutil-2.7.5 requests-2.20.1 semantic-version-2.6.0 six-1.11.0 smmap2-2.0.5 urllib3-1.24.1 virtualenv-16.1.0
ubuntu@ip-xxx-xxx-xxx-xxx:~$ bench --version

Command 'bench' not found, but can be installed with:

sudo apt install ruby-active-model-serializers

Hi,
maybe you should use manual install from there https://github.com/frappe/bench it looks the same in general but have some differences

Try this :

[Guide: Manual Install ERPNext on Ubuntu 17.xx & 18.xx]
(Guide To Install ERPNext ON 18.04)

1 Like

Hi - the only difference I could see was the bench checkout folder name “bench-repo”. I’ll have another look this evening.
Thanks,

Thanks Mim, I’ll have a compare between this and the guide in the github documentation.

when you go through the guide and get error access denied for user root

check this link

[https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost]
(access denied)

Don’t know whati was doing wrong the first time.
I wiped my Ubuntu install and started again. Worked perfectly.

1 Like