3

I am new to python and Frappe framework. I followed the steps provided in the following link to install Frappe framework on my Mac OS Sierra.

Frappe Bench Github

After successfully installing Python, MariaDB, Node JS, Redis and wkhtmltopdf (with patched qt) I created new folder named "FrappeSample" and run the following commands in it:

git clone https://github.com/frappe/bench bench-repo

pip install --user -e bench-repo

Now when I try to run the following command to install frappe bench

bench init frappe-bench && cd frappe-bench

I get the error which says:

-bash: bench: command not found

Can anyone please guide me what I did wrong or is there any extra configuration needed which was not properly mentioned in the documentation ?

phd
  • 82,685
  • 13
  • 120
  • 165
Zain SMJ
  • 1,492
  • 7
  • 19
  • 33

5 Answers5

2

In my case the bench command is found here:

  frappe@ubuntu:~/frappe-bench$ whereis bench
  bench: /usr/local/bin/bench

with /usr/local/bin on my PATH:

frappe@ubuntu:~/frappe-bench$ echo $PATH
/home/frappe/bin:/home/frappe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

To add /usr/local/bin (in the case where it is missing from PATH) just add it your .bashrc file:

PATH=$PATH:~/usr/local/bin/

Then restart the shell using exec bash

Note that bench commands must be run from the frappe-bench directory (that you specified)

clarkej
  • 21
  • 2
1
export PATH=$PATH:~/.local/bin

worked for me after following the The Hitchhiker's Guide to Installing Frappe on Linux. I started getting the error when I logged back several days after successful installation.

dh762
  • 2,259
  • 4
  • 25
  • 44
Bravo Gidi
  • 11
  • 3
0

It can be the PATH issue. While installing, in logs it used to give some location that needs to bhi included in PATH. Please check the installation logs.

Rohit Jindal
  • 667
  • 5
  • 13
0

frappe-bench is also available on PyPI. Try to install it using:

pip install frappe-bench

and then execute your command:

bench init frappe-bench && cd frappe-bench

Note: You might have to use sudo pip install frappe-bench command in order to install frappe-bench in the root user environment.

Nav
  • 61
  • 6
0

After execute this:

pip install --user -e bench-repo

Close that terminal and open a new one, bench will be working now.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 01 '23 at 06:21