I tried to install on a fresh VPS and got the error below:
TASK [bench : python3 bench init for production] *******************************
task path: /tmp/.bench/playbooks/roles/bench/tasks/main.yml:37
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/tmp/ansible-tmp-1565693906.0971105-265280960161005 `" && echo ansible-tmp-1565693906.0971105-265280960161005="` echo /var/tmp/ansible-tmp-1565693906.0971105-265280960161005 `" ) && sleep 0'
Using module file /usr/local/lib/python3.6/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-270770h79rr01/tmpgngz9i3f TO /var/tmp/ansible-tmp-1565693906.0971105-265280960161005/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'setfacl -m u:frappe:r-x /var/tmp/ansible-tmp-1565693906.0971105-265280960161005/ /var/tmp/ansible-tmp-1565693906.0971105-265280960161005/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u frappe /bin/sh -c '"'"'echo BECOME-SUCCESS-tmynybtwnknggoskjboadmipbykepcst ; /usr/bin/python3 /var/tmp/ansible-tmp-1565693906.0971105-265280960161005/AnsiballZ_command.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1565693906.0971105-265280960161005/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": [
"bench",
"init",
"/home/frappe/frappe-bench",
"--frappe-path",
"https://github.com/frappe/frappe",
"--frappe-branch",
"version-12",
"--python",
"python3"
],
"delta": "0:01:46.390314",
"end": "2019-08-13 11:00:12.850181",
"invocation": {
"module_args": {
"_raw_params": "bench init /home/frappe/frappe-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-12 --python python3",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": "/home/frappe/frappe-bench",
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2019-08-13 10:58:26.459867",
"stderr": "INFO:bench.utils:virtualenv -q env -p /usr/bin/python3\nINFO:bench.utils:env/bin/pip -q install --upgrade pip\nINFO:bench.utils:env/bin/pip -q install wheel\nINFO:bench.utils:env/bin/pip -q install six\nINFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit\nINFO:bench.app:getting app frappe\nINFO:bench.utils:git clone https://github.com/frappe/frappe --branch version-12 --origin upstream\nCloning into 'frappe'...\nINFO:bench.app:installing frappe\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe \n ERROR: Command errored out with exit status 1:\n command: /home/frappe/frappe-bench/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-2b7tmw27/psycopg2/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-2b7tmw27/psycopg2/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' egg_info --egg-base pip-egg-info\n cwd: /tmp/pip-install-2b7tmw27/psycopg2/\n Complete output (23 lines):\n running egg_info\n creating pip-egg-info/psycopg2.egg-info\n writing pip-egg-info/psycopg2.egg-info/PKG-INFO\n writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt\n writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt\n writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'\n \n Error: pg_config executable not found.\n \n pg_config is required to build psycopg2 from source. Please add the directory\n containing pg_config to the $PATH or specify the full executable path with the\n option:\n \n python setup.py build_ext --pg-config /path/to/pg_config build ...\n \n or with the pg_config option in 'setup.cfg'.\n \n If you prefer to avoid building psycopg2 from source, please install the PyPI\n 'psycopg2-binary' package instead.\n \n For further information please check the 'doc/src/install.rst' file (also at\n <http://initd.org/psycopg/docs/install.html>).\n \n ----------------------------------------\nERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.\nTraceback (most recent call last):\n File \"/usr/local/bin/bench\", line 11, in <module>\n load_entry_point('bench', 'console_scripts', 'bench')()\n File \"/home/frappe/.bench/bench/cli.py\", line 40, in cli\n bench_command()\n File \"/usr/lib/python3/dist-packages/click/core.py\", line 722, in __call__\n return self.main(*args, **kwargs)\n File \"/usr/lib/python3/dist-packages/click/core.py\", line 697, in main\n rv = self.invoke(ctx)\n File \"/usr/lib/python3/dist-packages/click/core.py\", line 1066, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File \"/usr/lib/python3/dist-packages/click/core.py\", line 895, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File \"/usr/lib/python3/dist-packages/click/core.py\", line 535, in invoke\n return callback(*args, **kwargs)\n File \"/home/frappe/.bench/bench/commands/make.py\", line 31, in init\n python \t\t = python)\n File \"/home/frappe/.bench/bench/utils.py\", line 75, in init\n get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)\n File \"/home/frappe/.bench/bench/app.py\", line 136, in get_app\n install_app(app=app_name, bench_path=bench_path, verbose=verbose)\n File \"/home/frappe/.bench/bench/app.py\", line 172, in install_app\n find_links=find_links))\n File \"/home/frappe/.bench/bench/utils.py\", line 161, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: /home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe ",
"stderr_lines": [
"INFO:bench.utils:virtualenv -q env -p /usr/bin/python3",
"INFO:bench.utils:env/bin/pip -q install --upgrade pip",
"INFO:bench.utils:env/bin/pip -q install wheel",
"INFO:bench.utils:env/bin/pip -q install six",
"INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit",
"INFO:bench.app:getting app frappe",
"INFO:bench.utils:git clone https://github.com/frappe/frappe --branch version-12 --origin upstream",
"Cloning into 'frappe'...",
"INFO:bench.app:installing frappe",
"INFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe ",
" ERROR: Command errored out with exit status 1:",
" command: /home/frappe/frappe-bench/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-2b7tmw27/psycopg2/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-2b7tmw27/psycopg2/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' egg_info --egg-base pip-egg-info",
" cwd: /tmp/pip-install-2b7tmw27/psycopg2/",
" Complete output (23 lines):",
" running egg_info",
" creating pip-egg-info/psycopg2.egg-info",
" writing pip-egg-info/psycopg2.egg-info/PKG-INFO",
" writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt",
" writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt",
" writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'",
" ",
" Error: pg_config executable not found.",
" ",
" pg_config is required to build psycopg2 from source. Please add the directory",
" containing pg_config to the $PATH or specify the full executable path with the",
" option:",
" ",
" python setup.py build_ext --pg-config /path/to/pg_config build ...",
" ",
" or with the pg_config option in 'setup.cfg'.",
" ",
" If you prefer to avoid building psycopg2 from source, please install the PyPI",
" 'psycopg2-binary' package instead.",
" ",
" For further information please check the 'doc/src/install.rst' file (also at",
" <http://initd.org/psycopg/docs/install.html>).",
" ",
" ----------------------------------------",
"ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.",
"Traceback (most recent call last):",
" File \"/usr/local/bin/bench\", line 11, in <module>",
" load_entry_point('bench', 'console_scripts', 'bench')()",
" File \"/home/frappe/.bench/bench/cli.py\", line 40, in cli",
" bench_command()",
" File \"/usr/lib/python3/dist-packages/click/core.py\", line 722, in __call__",
" return self.main(*args, **kwargs)",
" File \"/usr/lib/python3/dist-packages/click/core.py\", line 697, in main",
" rv = self.invoke(ctx)",
" File \"/usr/lib/python3/dist-packages/click/core.py\", line 1066, in invoke",
" return _process_result(sub_ctx.command.invoke(sub_ctx))",
" File \"/usr/lib/python3/dist-packages/click/core.py\", line 895, in invoke",
" return ctx.invoke(self.callback, **ctx.params)",
" File \"/usr/lib/python3/dist-packages/click/core.py\", line 535, in invoke",
" return callback(*args, **kwargs)",
" File \"/home/frappe/.bench/bench/commands/make.py\", line 31, in init",
" python \t\t = python)",
" File \"/home/frappe/.bench/bench/utils.py\", line 75, in init",
" get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)",
" File \"/home/frappe/.bench/bench/app.py\", line 136, in get_app",
" install_app(app=app_name, bench_path=bench_path, verbose=verbose)",
" File \"/home/frappe/.bench/bench/app.py\", line 172, in install_app",
" find_links=find_links))",
" File \"/home/frappe/.bench/bench/utils.py\", line 161, in exec_cmd",
" raise CommandFailedError(cmd)",
"bench.utils.CommandFailedError: /home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe "
],
"stdout": "Already using interpreter /usr/bin/python3\ninstalling frappe",
"stdout_lines": [
"Already using interpreter /usr/bin/python3",
"installing frappe"
]
}
PLAY RECAP *********************************************************************
localhost : ok=72 changed=46 unreachable=0 failed=1 skipped=47 rescued=0 ignored=0
Traceback (most recent call last):
File "install.py", line 413, in <module>
install_bench(args)
File "install.py", line 135, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
File "install.py", line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe']' returned non-zero exit status 2
root@ip-172-31-8-213:/home#