I have to run a docker compose but im getting a psycop2 error, which im not able to resolve. when running docker-compose, i get a message that my build failed:
#8 36.63 ERROR: No matching distribution found for psycopg2-binary==2.8.6
executor failed running [/bin/sh -c pip3 install -r requirements.txt]: exit code: 1
ERROR: Service 'worker' failed to build : Build failed
the reason appears to be that i dont have pg-config executable in place:
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'
one fix tried was to add the binary with pip, but when i just run pip install or directly install the requirements.txt, it says requirement is already satisfied :
Requirement already satisfied: psycopg2-binary==2.8.6 in ./env2/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (2.8.6)
any help is appreciated. running on mac 2020 m1