fatal: FAILED! => {"attempts": 5, "changed": false, "cmd": "/opt/openwisp2/env/bin/pip3 install -U psycopg2", "msg": "stdout: Collecting psycopg2\n Downloading psycopg2-2.8.6.tar.gz (383 kB)\n\n:stderr: /usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead\n from cryptography.utils import int_from_bytes\n/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead\n from cryptography.utils import int_from_bytes\nWARNING: The directory /.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\n ERROR: Command errored out with exit status 1:\n command: /opt/openwisp2/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-_m4m13d8/psycopg2/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-_m4m13d8/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 /tmp/pip-pip-egg-info-yo9inzt1\n cwd: /tmp/pip-install-_m4m13d8/psycopg2/\n Complete output (23 lines):\n running egg_info\n creating /tmp/pip-pip-egg-info-yo9inzt1/psycopg2.egg-info\n writing /tmp/pip-pip-egg-info-yo9inzt1/psycopg2.egg-info/PKG-INFO\n writing dependency_links to /tmp/pip-pip-egg-info-yo9inzt1/psycopg2.egg-info/dependency_links.txt\n writing top-level names to /tmp/pip-pip-egg-info-yo9inzt1/psycopg2.egg-info/top_level.txt\n writing manifest file '/tmp/pip-pip-egg-info-yo9inzt1/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 <
https://www.psycopg.org/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.\nWARNING: You are using pip version 20.2.4; however, version 21.1 is available.\nYou should consider upgrading via the '/opt/openwisp2/env/bin/python3 -m pip install --upgrade pip' command.\n"}