asdf-postgres icon indicating copy to clipboard operation
asdf-postgres copied to clipboard

no version set for command pg_config, despite it being in the path

Open mjhaller opened this issue 2 years ago • 3 comments

This is very similar to a reported issue with this asdf itself. It is unclear to me how to tell pip where pg_config is outside of it just being on the path. pg_config by itself from the CLI works fine from the same shell works fine.

if you install postgres globally it'll work. psycopg2 just wants pg_config in the path, which the shim is, but the shim won't operate.

pip install 
...
Collecting psycopg2-binary==2.8.6
  Using cached https://thezebra.jfrog.io/thezebra/api/pypi/pypi/packages/packages/fc/51/0f2c6aec5c59e5640f507b59567f63b9d73a9317898810b4db311da32dfc/psycopg2-binary-2.8.6.tar.gz (384 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/mhaller/projects/auto/iz2/.virtualenv/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-install-zzcailsq/psycopg2-binary_cc9f610c6cb44916b6f0505f59c1f3f9/setup.py'"'"'; __file__='"'"'/private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-install-zzcailsq/psycopg2-binary_cc9f610c6cb44916b6f0505f59c1f3f9/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 /private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-pip-egg-info-hg1hy_8z
       cwd: /private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-install-zzcailsq/psycopg2-binary_cc9f610c6cb44916b6f0505f59c1f3f9/
  Complete output (7 lines):
  running egg_info
  creating /private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-pip-egg-info-hg1hy_8z/psycopg2_binary.egg-info
  writing /private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-pip-egg-info-hg1hy_8z/psycopg2_binary.egg-info/PKG-INFO
  writing dependency_links to /private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-pip-egg-info-hg1hy_8z/psycopg2_binary.egg-info/dependency_links.txt
  writing top-level names to /private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-pip-egg-info-hg1hy_8z/psycopg2_binary.egg-info/top_level.txt
  writing manifest file '/private/var/folders/rr/8q8zznt94v33br236p0ctn_c0000gp/T/pip-pip-egg-info-hg1hy_8z/psycopg2_binary.egg-info/SOURCES.txt'
  Error: b'No version is set for command pg_config\n'
  ----------------------------------------
WARNING: Discarding https://thezebra.jfrog.io/thezebra/api/pypi/pypi/packages/packages/fc/51/0f2c6aec5c59e5640f507b59567f63b9d73a9317898810b4db311da32dfc/psycopg2-binary-2.8.6.tar.gz#sha256=11b9c0ebce097180129e422379b824ae21c8f2a6596b159c7659e2e5a00e1aa0 (from https://thezebra.jfrog.io/thezebra/api/pypi/pypi/simple/psycopg2-binary/) (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: Could not find a version that satisfies the requirement psycopg2-binary==2.8.6 (from versions: 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1, 2.9.2, 2.9.3)
ERROR: No matching distribution found for psycopg2-binary==2.8.6

mjhaller avatar May 02 '22 21:05 mjhaller

I'm so sorry. I just saw this. My github notifications are apparently not emailing me. I have no idea what is causing this. I'll see if I can duplicate it and figure it out.

smashedtoatoms avatar Jul 07 '22 02:07 smashedtoatoms

Related issue in the psycopg2 repo: https://github.com/psycopg/psycopg2/issues/1356

magni- avatar May 17 '23 09:05 magni-