Course Content
Create the frappe-bench directory
Faris Ansari
May 19, 2021

Let's create our project folder which will contain our apps and sites. Run the following command:

bench init frappe-bench

This will create a directory named frappe-bench in your current working directory. It will do the following:

  1. Create a python virtual environment under env directory.
  2. Fetch and install the frappe app as a python package.
  3. Install node modules of frappe.
  4. Build static assets.
Questions
Not able to install
GR Gulshan Ramnath Prajapati
4 months ago
Post
Dismiss

I am using Python 3.9.13

But when I run the command bench init frappe-bench

It gives me an error

ERROR: Package 'frappe' requires a different Python: 3.8.2 not in '>=3.10'

Full output

Setting Up Environment $ /usr/local/bin/virtualenv --quiet env -p python3 $ /Users/gulshanprajapati/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip Getting frappe $ git clone https://github.com/frappe/frappe.git --depth 1 --origin upstream Cloning into 'frappe'... remote: Enumerating objects: 3178, done. remote: Counting objects: 100% (3178/3178), done. remote: Compressing objects: 100% (2851/2851), done. remote: Total 3178 (delta 419), reused 1171 (delta 227), pack-reused 0 Receiving objects: 100% (3178/3178), 15.97 MiB | 3.42 MiB/s, done. Resolving deltas: 100% (419/419), done. Installing frappe $ /Users/gulshanprajapati/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/gulshanprajapati/frappe-bench/apps/frappe ERROR: Package 'frappe' requires a different Python: 3.8.2 not in '>=3.10' Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/bench/commands/make.py", line 70, in init init( File "/usr/local/lib/python3.9/site-packages/bench/utils/render.py", line 95, in wrapperfn return fn(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/bench/utils/system.py", line 79, in init getapp( File "/usr/local/lib/python3.9/site-packages/bench/app.py", line 433, in getapp app.install(verbose=verbose, skipassets=skipassets, restartbench=restartbench) File "/usr/local/lib/python3.9/site-packages/bench/utils/render.py", line 110, in wrapperfn return fn(args, *kwargs) File "/usr/local/lib/python3.9/site-packages/bench/app.py", line 232, in install installapp( File "/usr/local/lib/python3.9/site-packages/bench/app.py", line 553, in installapp bench.run(f"{bench.python} -m pip install {quietflag} --upgrade -e {apppath} {cacheflag}") File "/usr/local/lib/python3.9/site-packages/bench/bench.py", line 47, in run return execcmd(cmd, cwd=cwd or self.cwd) File "/usr/local/lib/python3.9/site-packages/bench/utils/init.py", line 153, in exec_cmd raise CommandFailedError bench.exceptions.CommandFailedError

Want to discuss?
Post it here, our mentors will help you out.
Add details about how to specify version
JH Jason Hunt
7 months ago
Post
Dismiss

It might be helpful to note that you have the option to specify which version of frappe to install. For example, to install version 13:

bench init --version version-13 frappe-bench

Without the --version parameter, the latest development branch is installed (currently version 14)

Want to discuss?
Post it here, our mentors will help you out.