'''pip安装psycopg2收集psycopg2使用缓存的psycopg2-2.8.5.tar.gz(380 kB)错误:命令错误,退出状态为1:命令:/ opt / anaconda3 / bin / python -c'导入sys,setuptools,令牌化; sys.argv [0] ='“'”'/private/var/folders/v8/vk9679rj7m7f03_0hztz3rc80000gn/T/pip-install-d7jzvy68/psycopg2/setup.py'“'”'; 文件 ='“'”'/ private / var / folders / v8 / vk9679rj7m7f03_0hztz3rc80000gn / T / pip-install-d7jzvy68 / psycopg2 / setup.py'“'”'; f = getattr(tokenize,'“' “'open'”'“',打开)(文件); 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-6sv6r8teCWD:/ private / var / folders / v8 / vk9679rj7m7f03_0hztz3rc80000gn / T / pip-install-d7jzvy68 / psycopg2 /完整输出(23行):运行egg_info创建/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将dependency_links写入/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检查日志以获取完整的命令输出。'''
pip install psycopg2-binary