Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2-binary should not be used. #186

Open
ns-iknox opened this issue Jun 16, 2020 · 1 comment
Open

psycopg2-binary should not be used. #186

ns-iknox opened this issue Jun 16, 2020 · 1 comment

Comments

@ns-iknox
Copy link
Contributor

As discovered in Issue #185, we should not be using the binary package in a production codebase.
Currently both versions are required in setup.py.

@EMCP
Copy link

EMCP commented Aug 5, 2021

my installation fails even when I use the binary... unsure how to proceed

$ pip install psycopg2-binary
Requirement already satisfied: psycopg2-binary in /home/emcp/anaconda3/envs/meltano-/lib/python3.8/site-packages (2.9.1)
$ meltano add loader target-postgres
Loader 'target-postgres' already exists in your Meltano project
To add it to your project another time so that each can be configured differently,
add a new plugin inheriting from the existing one with its own unique name:
        meltano add loader target-postgres--new --inherit-from target-postgres

Installing loader 'target-postgres'...
Loader 'target-postgres' could not be installed: failed to install plugin 'target-postgres'.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2_f2eb0717b4694b6b9e37ca2684759aae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2_f2eb0717b4694b6b9e37ca2684759aae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-io9muisp
         cwd: /tmp/pip-install-wv16bb9e/psycopg2_f2eb0717b4694b6b9e37ca2684759aae/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-io9muisp/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-io9muisp/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-io9muisp/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-io9muisp/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-io9muisp/psycopg2.egg-info/SOURCES.txt'
    
    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>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a8/8f/1c5690eebf148d1d1554fc00ccf9101e134636553dbb75bdfef4f85d7647/psycopg2-2.8.5.tar.gz#sha256=f7d46240f7a1ae1dd95aab38bd74f7428d46531f69219954266d669da60c0818 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2_33c9ba163d364687b2cac5026a34af01/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2_33c9ba163d364687b2cac5026a34af01/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zgi8twhs
         cwd: /tmp/pip-install-wv16bb9e/psycopg2_33c9ba163d364687b2cac5026a34af01/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-zgi8twhs/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-zgi8twhs/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-zgi8twhs/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-zgi8twhs/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-zgi8twhs/psycopg2.egg-info/SOURCES.txt'
    
    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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/84/d7/6a93c99b5ba4d4d22daa3928b983cec66df4536ca50b22ce5dcac65e4e71/psycopg2-2.8.4.tar.gz#sha256=f898e5cc0a662a9e12bde6f931263a1bbd350cfb18e1d5336a12927851825bb6 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2_eeed467e937c43f3ada000a8efa72192/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2_eeed467e937c43f3ada000a8efa72192/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-sd0q8id0
         cwd: /tmp/pip-install-wv16bb9e/psycopg2_eeed467e937c43f3ada000a8efa72192/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-sd0q8id0/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-sd0q8id0/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-sd0q8id0/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-sd0q8id0/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-sd0q8id0/psycopg2.egg-info/SOURCES.txt'
    
    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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/23/7e/93c325482c328619870b6cd09370f6dbe1148283daca65115cd63642e60f/psycopg2-2.8.2.tar.gz#sha256=5cacf21b6f813c239f100ef78a4132056f93a5940219ec25d2ef833cbeb05588 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2-binary_d92771c5e2334f4c9da8bce9d3602e91/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2-binary_d92771c5e2334f4c9da8bce9d3602e91/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-u3myz4rg
         cwd: /tmp/pip-install-wv16bb9e/psycopg2-binary_d92771c5e2334f4c9da8bce9d3602e91/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-u3myz4rg/psycopg2_binary.egg-info
    writing /tmp/pip-pip-egg-info-u3myz4rg/psycopg2_binary.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-u3myz4rg/psycopg2_binary.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-u3myz4rg/psycopg2_binary.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-u3myz4rg/psycopg2_binary.egg-info/SOURCES.txt'
    
    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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/dd/56/c22da10f5a725d61c58a185ec0f803aa2d384646ee8eb83d8ce88ed5edb1/psycopg2-binary-2.7.7.tar.gz#sha256=b19e9f1b85c5d6136f5a0549abdc55dcbd63aba18b4f10d0d063eb65ef2c68b4 (from https://pypi.org/simple/psycopg2-binary/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2_fa517cec4ae1412895a4a728da0aeaf4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2_fa517cec4ae1412895a4a728da0aeaf4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-bqn353eu
         cwd: /tmp/pip-install-wv16bb9e/psycopg2_fa517cec4ae1412895a4a728da0aeaf4/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-bqn353eu/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-bqn353eu/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-bqn353eu/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-bqn353eu/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-bqn353eu/psycopg2.egg-info/SOURCES.txt'
    
    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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/63/54/c039eb0f46f9a9406b59a638415c2012ad7be9b4b97bfddb1f48c280df3a/psycopg2-2.7.7.tar.gz#sha256=f4526d078aedd5187d0508aa5f9a01eae6a48a470ed678406da94b4cd6524b7e (from https://pypi.org/simple/psycopg2/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2_6754af545b67469c96e33d73ceab26f3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2_6754af545b67469c96e33d73ceab26f3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-8m_hqan0
         cwd: /tmp/pip-install-wv16bb9e/psycopg2_6754af545b67469c96e33d73ceab26f3/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-8m_hqan0/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-8m_hqan0/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-8m_hqan0/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-8m_hqan0/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-8m_hqan0/psycopg2.egg-info/SOURCES.txt'
    
    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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/94/09/2f1fae36d83e2315b90ee91738d01baf8af8c945726bf4b4708fcec3256d/psycopg2-2.7.6.tar.gz#sha256=4a658550b0bcb259e97f77f2dc93ed6b108fe2eda963a9e6fc8b48040d542ec2 (from https://pypi.org/simple/psycopg2/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /home/emcp/Dev/git/meltano--ib/.meltano/loaders/target-postgres/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wv16bb9e/psycopg2-binary_958898d9f482472093f3b321dd306c42/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wv16bb9e/psycopg2-binary_958898d9f482472093f3b321dd306c42/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-oj_f5uex
         cwd: /tmp/pip-install-wv16bb9e/psycopg2-binary_958898d9f482472093f3b321dd306c42/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-oj_f5uex/psycopg2_binary.egg-info
    writing /tmp/pip-pip-egg-info-oj_f5uex/psycopg2_binary.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-oj_f5uex/psycopg2_binary.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-oj_f5uex/psycopg2_binary.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-oj_f5uex/psycopg2_binary.egg-info/SOURCES.txt'
    
    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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/77/09/4991fcd9a8f4bea1ee3948e1729fa17c184d25bd10809bacc143626361b9/psycopg2-binary-2.7.4.tar.gz#sha256=de4f88f823037a71ea5ef3c1041d96b8a68d73343133edda684fd42f575bd9d7 (from https://pypi.org/simple/psycopg2-binary/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Cannot install singer-target-postgres==0.1.0, singer-target-postgres==0.1.1, singer-target-postgres==0.1.10, singer-target-postgres==0.1.11, singer-target-postgres==0.1.2, singer-target-postgres==0.1.3, singer-target-postgres==0.1.4, singer-target-postgres==0.1.5, singer-target-postgres==0.1.6, singer-target-postgres==0.1.7, singer-target-postgres==0.1.8, singer-target-postgres==0.1.9, singer-target-postgres==0.2.0, singer-target-postgres==0.2.1, singer-target-postgres==0.2.2, singer-target-postgres==0.2.3 and singer-target-postgres==0.2.4 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Failed to install plugin(s)

EDIT: Found solution was #185 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants