''' pip install psycopg2 收集 psycopg2 使用缓存的 psycopg2-2.8.5.tar.gz(380 kB) 错误:命令退出状态为 1: 命令:/ opt / anaconda3 / bin / python-c 'import sys, setuptools, tokenize; sys.argv [0] =' "'"' '/ private / var / folders / v8 / vk9679rj7m7f03_0hztz3rc80000gn / T / pip-install-d7jzvy68 / psycopg2 / setup.py'"'"'; file='"'"'/private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-install-d7jzvy68/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-pip-egg-info-6sv6r8te 当前工作目录:/private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-install-d7jzvy68/psycopg2/ 完整输出(23行): 运行蛋信息 创建 /private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-pip-egg-info-6sv6r8te/psycopg2.egg-info 将 /private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-pip-egg-info-6sv6r8te/psycopg2.egg-info/PKG-INFO 写入文件 将依赖项链接写入 /private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-pip-egg-info-6sv6r8te/psycopg2.egg-info/dependency_links.txt 将顶级名称写入 /private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-pip-egg-info-6sv6r8te/psycopg2.egg-info/top_level.txt 将清单文件 '/private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-pip-egg-info-6sv6r8te/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>).
----------------------------------------
错误:命令以1的退出状态出错:python setup.py egg_info,请检查完整的命令输出日志。