首页 > 解决方案 > 安装 odoo 时命令在 mac 上出现退出状态 1 错误

问题描述

命令:/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(编译(代码,_文件, '"'"'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 检查日志以获取完整的命令输出。

标签: macosodoo-13

解决方案


先安装 pg_config 然后再试一次。

首先运行这个 brew 命令:

brew install postgresql

然后重新安装。


推荐阅读