Closed rickybasse closed 4 years ago
can you try install postgres dependencies with Homebrew? (https://brew.sh/)
brew install postgres
and ./install.sh --acceptlicenses
should do the trick
After installing postgres dependencies the process was able to collect psycopg2
but failed during the package installation phase.
The logs are quite verbose but this should be enough to give you some context:
...
Installing collected packages: argparse, tabulate, PyYAML, attrs, six, pyrsistent, jsonschema, MarkupSafe, jinja2, pycparser, cffi, bcrypt, asn1crypto, cryptography, pynacl, paramiko, ansible, joblib, idna, PyMySQL, psycopg2, jmespath, urllib3, python-dateutil, docutils, botocore, s3transfer, boto3, azure-common, certifi, chardet, requests, azure-nspkg, azure-storage, future, entrypoints, keyring, pyasn1, ijson, pyOpenSSL, pycryptodomex, pyjwt, pytz, pyasn1-modules, snowflake-connector-python, more-itertools, wcwidth, py, pyparsing, packaging, atomicwrites, zipp, importlib-metadata, pluggy, pytest, pytest-dependency, coverage, python-dotenv, pipelinewise
Running setup.py install for tabulate ... done
Running setup.py install for PyYAML ... done
Running setup.py install for pyrsistent ... done
Running setup.py install for ansible ... done
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/rbassetto/babbel/repos/pipelinewise/.virtualenvs/pipelinewise/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/sh/gf_0zlrs6pl42pd9jg3yj8n80000gn/T/pip-install-nn6i3t5r/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/sh/gf_0zlrs6pl42pd9jg3yj8n80000gn/T/pip-install-nn6i3t5r/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/sh/gf_0zlrs6pl42pd9jg3yj8n80000gn/T/pip-record-7_1y3wpc/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rbassetto/babbel/repos/pipelinewise/.virtualenvs/pipelinewise/include/site/python3.7/psycopg2
cwd: /private/var/folders/sh/gf_0zlrs6pl42pd9jg3yj8n80000gn/T/pip-install-nn6i3t5r/psycopg2/
Complete output (144 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/_json.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/extras.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/compat.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/errorcodes.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/tz.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/_range.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/_ipaddress.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/_lru_cache.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/extensions.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/errors.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/sql.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
copying lib/pool.py -> build/lib.macosx-10.14-x86_64-3.7/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/psycopg
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSYCOPG_VERSION=2.8.2 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110005 -DHAVE_LO64=1 -I/Users/rbassetto/babbel/repos/pipelinewise/.virtualenvs/pipelinewise/include -I/Users/rbassetto/.pyenv/versions/3.7.3/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.5_1/include -I/usr/local/Cellar/postgresql/11.5_1/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.14-x86_64-3.7/psycopg/psycopgmodule.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSYCOPG_VERSION=2.8.2 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110005 -DHAVE_LO64=1 -I/Users/rbassetto/babbel/repos/pipelinewise/.virtualenvs/pipelinewise/include -I/Users/rbassetto/.pyenv/versions/3.7.3/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.5_1/include -I/usr/local/Cellar/postgresql/11.5_1/include/server -c psycopg/green.c -o build/temp.macosx-10.14-x86_64-3.7/psycopg/green.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSYCOPG_VERSION=2.8.2 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110005 -DHAVE_LO64=1 -I/Users/rbassetto/babbel/repos/pipelinewise/.virtualenvs/pipelinewise/include -I/Users/rbassetto/.pyenv/versions/3.7.3/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.5_1/include -I/usr/local/Cellar/postgresql/11.5_1/include/server -c psycopg/pqpath.c -o build/temp.macosx-10.14-x86_64-3.7/psycopg/pqpath.o
psycopg/pqpath.c:135:17: warning: implicit conversion from enumeration type 'ConnStatusType' to different enumeration type 'ExecStatusType' [-Wenum-conversion]
PQstatus(conn->pgconn) : PQresultStatus(*pgres)));
^~~~~~~~~~~~~~~~~~~~~~
psycopg/pqpath.c:1710:11: warning: code will never be executed [-Wunreachable-code]
ret = 1;
^
psycopg/pqpath.c:1815:17: warning: implicit conversion from enumeration type 'ConnStatusType' to different enumeration type 'ExecStatusType' [-Wenum-conversion]
PQstatus(curs->conn->pgconn) : PQresultStatus(curs->pgres)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
this looks similar to https://stackoverflow.com/questions/55839111/installing-psycopg2-fails-on-macos-with-unclear-error-message when installing psycopg2 fails. But to confirm we need to see the full error message. Maybe your openssl or some other library install path is not in sync with pg_config
.
Is there anything like ld: library not found ...
in the full output of the error message?
If yes then you can try to compare the missing path in the error message to the output of pg_config
. This might give a clue.
Sorry @koszti for the late reply, I moved to another topic and I didn't had time to continue with the investigation. Should we leave this one open anyway or you prefer to close it?
solved by switching to psycopg2-binary
starting from PPW 0.16.0 by commit https://github.com/transferwise/pipelinewise/pull/397/files#diff-2eeaed663bd0d25b7e608891384b7298R28
psycopg2-binary
doesn't require a compiler or external libraries.
For those coming here from the google, if your trying to install psycopg2-binary on an M1/M2 macbook, use the most latest version of psycopg2-binary <3
I am having toubles installing the tool from source following the guidelines
Expected Behavior
The tool should complete the steps and successfully install
Actual Behavior
Executing
./install.sh --acceptlicenses
results in:Steps to Reproduce the Problem
cd
into the just cloned directory./install.sh --acceptlicenses
Specifications
Let me know if you need any other context information.