【发布时间】:2025-12-02 23:20:19
【问题描述】:
命令:/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/d1/qbs5yr054qb2w8kk6dmwzz9r0000gn/T/pip-install-cu02imcv/psycopg2/setup.py'"'"'; _file='"'"'/private/var/folders/d1/qbs5yr054qb2w8kk6dmwzz9r0000gn/T/pip-install-cu02imcv/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 pip-egg-info cwd:/private/var/folders/d1/qbs5yr054qb2w8kk6dmwzz9r0000gn/T/pip-install-cu02imcv/psycopg2/ 完整输出(23 行): 运行 egg_info 创建 pip-egg-info/psycopg2.egg-info 写 pip-egg-info/psycopg2.egg-info/PKG-INFO 将dependency_links写入pip-egg-info/psycopg2.egg-info/dependency_links.txt 将*名称写入 pip-egg-info/psycopg2.egg-info/top_level.txt 编写清单文件'pip-egg-info/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>).
----------------------------------------
错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出。
【问题讨论】:
-
以后还要提出一个实际的问题,而不仅仅是错误信息。人们会否决你。