How to install ERPNext-12 in docker?

I want to setup the ERPNext-12 version in docker development I’m already referring this document

while running this command

nvm use v12
PYENV_VERSION=3.10.13 bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
cd frappe-bench

I’m getting this error

frappe@9154debc2da1:/workspace/development$ PYENV_VERSION=3.10.13 bench init --skip-redis-config-generation --frappe-bra
nch version-12 frappe-bench
Setting Up Environment
$ python3 -m venv env
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet wheel
Getting frappe
$ git clone --branch version-12 --depth 1 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 2665, done.
remote: Counting objects: 100% (2665/2665), done.
remote: Compressing objects: 100% (2458/2458), done.
remote: Total 2665 (delta 349), reused 1152 (delta 157), pack-reused 0
Receiving objects: 100% (2665/2665), 12.47 MiB | 2.47 MiB/s, done.
Resolving deltas: 100% (349/349), done.
Installing frappe
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /workspace/development/frappe-bench/apps/frappe 
WARNING: The candidate selected for download or install is a yanked version: 'braintree' candidate (version 3.57.1 at (from
Reason for being yanked: critical bugs
$ yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
subprocess.CalledProcessError: Command 'yarn install' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/frappe/.bench/bench/commands/", line 75, in init
  File "/home/frappe/.bench/bench/utils/", line 105, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.bench/bench/utils/", line 87, in init
  File "/home/frappe/.bench/bench/", line 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/home/frappe/.bench/bench/utils/", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.bench/bench/", line 242, in install
  File "/home/frappe/.bench/bench/", line 581, in install_app"yarn install", cwd=app_path)
  File "/home/frappe/.bench/bench/", line 48, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
  File "/home/frappe/.bench/bench/utils/", line 158, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: yarn install

ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: 

This link is help me to setup Version-12

but even though im facing one error while running this command

bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
cd frappe-bench


      psycopg/psycopgmodule.c: In function ‘add_module_types’:
      psycopg/psycopgmodule.c:920:36: error: lvalue required as left operand of assignment
        920 |         Py_TYPE(typetable[i].type) = &PyType_Type;
            |                                    ^
      psycopg/psycopgmodule.c: In function ‘datetime_init’:
      psycopg/psycopgmodule.c:952:30: error: lvalue required as left operand of assignment
        952 |     Py_TYPE(&pydatetimeType) = &PyType_Type;
            |                              ^
      psycopg/psycopgmodule.c: In function ‘PyInit__psycopg’:
      psycopg/psycopgmodule.c:1084:28: error: lvalue required as left operand of assignment
       1084 |     Py_TYPE(&typecastType) = &PyType_Type;
            |                            ^
      psycopg/psycopgmodule.c:1087:25: error: lvalue required as left operand of assignment
       1087 |     Py_TYPE(&chunkType) = &PyType_Type;
            |                         ^
      psycopg/psycopgmodule.c:1090:25: error: lvalue required as left operand of assignment
       1090 |     Py_TYPE(&errorType) = &PyType_Type;
            |                         ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psycopg2-binary
ERROR: Could not build wheels for psycopg2-binary, which is required to install pyproject.toml-based projects


It’s unlikely that you will be able to install ERPNext version 12 now due to dependencies version issues. If I’m not mistaken ERPNext didn’t lock dependencies version.

First thing I notice from your snippet is Python version, I believed it should be version 3.6 you could change it and try again.

Else you could try my docker image on docker hub.

1 Like

Thank you