Since there seems to be a lot of confusion around how to correctly install
bench, I’ve decided to write a tutorial about it.
pip3 (Python 3 package installer) needs to be installed on your machine. You can try running the following command to see if it’s available:
On Debian-based systems (this includes Ubuntu and Ubuntu flavoured OSes),
pip3 can be installed by running the following command:
sudo apt install python3-pip
bench used to be installed in an editable mode. Or maybe you installed the package from PyPI in the user directory. In any case, run the following commands if you want to start afresh.
pip3 uninstall frappe-bench # Removes bench from the user directory sudo -H pip3 uninstall frappe-bench # Removes bench installed globally
If you used Python 2 for an earlier installation of
bench, run the above commands with a slight modification: replace
pip3 with the
After this, in case you had earlier installed
bench in editable mode, you can safely remove the cloned bench repository.
It is important to note that bench does not need to be installed twice. Since it sometimes need to be run as
sudo), it needs to be installed system-wide. Like any other executable installed system-wide,
bench will still be accessible as a regular user.
sudo -H pip3 install frappe-bench
bench should now be installed. You can test that by running the following:
Like any other package installed using
pip3, you can upgrade bench easily by running the following command:
sudo -H pip3 install --upgrade frappe-bench