macos - 安装 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 检查日志以获取完整的命令输出。
解决方案
先安装 pg_config 然后再试一次。
首先运行这个 brew 命令:
brew install postgresql
然后重新安装。
推荐阅读
- algorithm - 对 n 个值进行排序所需的比较次数?
- deployment - 使用yum组织和部署相关组件子系统的发布的方法
- c++ - 代码打印出一系列无意义的数字
- r - 如何在森林图中分配不同颜色的负面和正面影响?
- angular - 在构造函数内调用服务时返回不工作
- regex - 编写适当的正则表达式以删除某些字符串之间的所有内容,以便在记事本++中查找和替换
- html - 如何对齐左侧的 2 个第一个元素和右侧的最后一个元素
- javascript - 从交换的键和值 ES6 Map 创建 JavaScript 对象
- c++ - 如何在 sqlite_orm 的 make_column 中显式指定列的类型?
- batch-file - 当我从 svn 签出代码并且我的文件夹格式为 TEST1 时,如何使用批处理脚本查找最后创建的文件夹