No command 'bench' found error in ubuntu 14.04

I am trying to instll erpnext on ubuntu 14.04 virtualbox. I followed the steps from easy installation step of frappe from github but I am getting error as command ‘bench’ not found error. Please help me.
My commad promp:

sanam@sanam:~$ sudo bash setup_frappe.sh
[sudo] password for sanam:
Installing for Ubuntu trusty x86
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf
Adding frappe user
Obtaining file:///home/sanam/bench-repo
Running setup.py (path:/home/sanam/bench-repo/setup.py) egg_info for package from file:///home/sanam/bench-repo

file bench.py (for module bench) not found

Downloading/unpacking Click (from bench==0.1)
Downloading/unpacking jinja2 (from bench==0.1)
Running setup.py (path:/tmp/pip_build_root/jinja2/setup.py) egg_info for package jinja2

warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'

Downloading/unpacking virtualenv (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages (from bench==0.1)
Downloading/unpacking honcho (from bench==0.1)
Cleaning up…
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1197, in prepare_files
do_download,
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1375, in unpack_url
self.session,
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 546, in unpack_http_url
resp = session.get(target_url, stream=True)
File “/usr/lib/python2.7/dist-packages/requests/sessions.py”, line 467, in get
return self.request(‘GET’, url, **kwargs)
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/usr/lib/python2.7/dist-packages/requests/sessions.py”, line 455, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python2.7/dist-packages/requests/sessions.py”, line 558, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python2.7/dist-packages/requests/adapters.py”, line 378, in send
raise ConnectionError(e)
ConnectionError: HTTPSConnectionPool(host=‘pypi.python.org’, port=443): Max retries exceeded with url: /packages/2.7/h/honcho/honcho-0.6.4-py2.py3-none-any.whl (Caused by <class ‘httplib.BadStatusLine’>: ‘’)

Storing debug log for failure in /home/sanam/.pip/pip.log
sanam@sanam:~$ cd ~
sanam@sanam:~$ bench init frappe-bench
No command ‘bench’ found, did you mean:
Command ‘dbench’ from package ‘dbench’ (universe)
Command ‘tbench’ from package ‘dbench’ (universe)
bench: command not found
sanam@sanam:~$ sudo bash setup_frappe.sh
[sudo] password for sanam:
Installing for Ubuntu trusty x86
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf
Adding frappe user
fatal: destination path ‘bench-repo’ already exists and is not an empty directory.
sanam@sanam:~$ bench init frappe-bench
No command ‘bench’ found, did you mean:
Command ‘tbench’ from package ‘dbench’ (universe)
Command ‘dbench’ from package ‘dbench’ (universe)
bench: command not found

As it says there, the script failed in the middle as it couldn’t connect to PyPI.

First, please recover Mysql root password, http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

To continue,

cd ~/
sudo pip install -e ~/bench-repo
bench init frappe-bench --apps_json https://raw.githubusercontent.com/frappe/bench/master/install_scripts/erpnext-apps.json
cd frappe-bench
bench new-site site1.local
bench frappe --install_app erpnext
bench frappe --install_app shopping_cart

Thank you for your reply.
I am not able to set mysql password it gives me error saying authentication required. I tried to many solutions but I am not able to clear this.
I tried to follow up your other steps I got erpnext folder in by frappe-bench folder . but command bench start is not opening my site. I guess this may be due to the database setup.

@sanam
I recognize that :slight_smile:

You might benefit from my experience

Or you might consider a clean slate.

I can recommend to use a netboot image to install Ubuntu 14.04 in VM

When selecting installation components only base-server should be selected.

Shutdown the VM and make yourself a snapshot.

Start the VM and login.

Use the instruction from GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

This might just get you off the ground

b.rgds

FH

1 Like

You can sudo apt-get purge mariadb-server mariadb-common libmariadbclient-dev and sudo apt-get install mariadb-server mariadb-common libmariadbclient-dev to reinstall and it should ask you to set the root password also. Then proceed with new-site and install-app commands

I just reinstalled my ubuntu and now its working perfectly.
Thankyou for your help. :blush: