postgresql is required on macOS Monterey
See original GitHub issueDescription
On macOS Monterey postgresql is required in order to install Synapse.
Steps to reproduce
Run poetry install --extras all
and notice how it fails.
$ poetry install --extras all
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing psycopg2 (2.9.3): Failed
EnvCommandError
Command ['/Users/jm/Library/Caches/pypoetry/virtualenvs/matrix-synapse-9UQhfgjM-py3.8/bin/pip', 'install', '--no-deps', 'file:///Users/jm/Library/Caches/pypoetry/artifacts/3c/7a/60/e4a0d26c4cee1923be3b7ae2cb545f115a822e112a6c5b5434bd25eacd/psycopg2-2.9.3.tar.gz'] errored with the following return code 1, and output:
Processing /Users/jm/Library/Caches/pypoetry/artifacts/3c/7a/60/e4a0d26c4cee1923be3b7ae2cb545f115a822e112a6c5b5434bd25eacd/psycopg2-2.9.3.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
running egg_info
creating /private/var/folders/zv/cnks6dx14rl25kvgqslhpv740000gn/T/pip-pip-egg-info-qrjfl19z/psycopg2.egg-info
writing /private/var/folders/zv/cnks6dx14rl25kvgqslhpv740000gn/T/pip-pip-egg-info-qrjfl19z/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/zv/cnks6dx14rl25kvgqslhpv740000gn/T/pip-pip-egg-info-qrjfl19z/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/zv/cnks6dx14rl25kvgqslhpv740000gn/T/pip-pip-egg-info-qrjfl19z/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/zv/cnks6dx14rl25kvgqslhpv740000gn/T/pip-pip-egg-info-qrjfl19z/psycopg2.egg-info/SOURCES.txt'
/Users/jm/Library/Caches/pypoetry/virtualenvs/matrix-synapse-9UQhfgjM-py3.8/lib/python3.8/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
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
<https://www.psycopg.org/docs/install.html>).
[end of output]
...
After running brew install postgresql
it succeeds.
I think we should add this in the platform-specific installation instructions for macOS: https://matrix-org.github.io/synapse/latest/setup/installation.html#macos
Homeserver
n/a
Synapse Version
Current develop
Installation Method
n/a
Platform
macOS Monterey
Relevant log output
n/a
Anything else that would be useful to know?
n/a
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
macOS packages - PostgreSQL
You can get macOS PostgreSQL packages from several different sources. Interactive installer by EDB. Download the installer certified by EDB for all supported ......
Read more >Error Installing Postgres on macOS Monterey 12.0.1 - Reddit
I got postgresql server, PG Admin 4. Do I need the command line tools to install this?
Read more >Install and Use PostgreSQL 14 on macOS Monterey
Method 1: Install PostgreSQL 14 Manually on macOS Monterey · Step 1. Download the Postgres.app · Step 2. Move the Downloaded File to...
Read more >Can't install Postgres on MacBook M1, Mac OS Monterey 12.4
I have problems installing Postgres on my MacBook M1.
Read more >Starting PostgreSQL Server on Mac OS X via Homebrew
In most cases, you'll likely wish to have PostgreSQL launch when you start up your system, so you'll need to tell your computer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This seems to be a mess - cf https://www.psycopg.org/articles/2018/02/08/psycopg-274-released/ and https://github.com/psycopg/psycopg2/issues/674. To cut a long story short: use of
psycopg2-binary
seems to be risky. Previously, allowing an either/or situation was tricky, but maybe that has now changed?This seems to be https://github.com/psycopg/psycopg2/issues/1482
Sorry, this is Python 3.8.9 on an M1.