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:
ld: warning: directory not found for option '-L/usr/local/opt/openssl@1.1/lib' ld: warning: directory not found for option '-L/usr/local/opt/python@3.8/lib' ld: warning: directory not found for option '-L/usr/local/opt/icu4c/lib' ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'clang' failed with exit status 1