当前位置: 首页 > news >正文

Mac 安装psycopg2,报错Error: pg_config executable not found.

在mac 上安装psycopg2的方法:执行:pip3 install psycopg2-binary

如果执行pip3 install psycopg2,无法安装psycopg2

报错信息如下:

Collecting psycopg2Using cached psycopg2-2.9.9.tar.gz (384 kB)Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [23 lines of output]running egg_infocreating /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-infowriting /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/PKG-INFOwriting dependency_links to /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/dependency_links.txtwriting top-level names to /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/top_level.txtwriting manifest file '/private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/SOURCES.txt'Error: pg_config executable not found.pg_config is required to build psycopg2 from source.  Please add the directorycontaining pg_config to the $PATH or specify the full executable path with theoption: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>).[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed× Encountered error while generating package metadata.
╰─> See above for output.note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
http://www.lryc.cn/news/211766.html

相关文章:

  • 域名系统 DNS
  • Vue $nextTick 模板解析后在执行的函数
  • VBA技术资料MF76:将自定义颜色添加到调色板
  • zilong-20231030
  • 目标检测算法发展史
  • React 生成传递给无障碍属性的唯一 ID
  • 十种排序算法(1) - 准备测试函数和工具
  • IRF联动 BFD-MAD
  • 双向链表的初步练习
  • IDE的组成
  • 项目解读_v2
  • 杀毒软件哪个好,杀毒软件有哪些
  • Ubuntu上安装配置Nginx
  • C++之string
  • 多线程---单例模式
  • SpringBoot相比于Spring的优点(自动配置和依赖管理)
  • SAP SPAD新建打印纸张
  • C# 图解教程 第5版 —— 第11章 结构
  • 车载电子电器架构 —— 基于AP定义车载HPC
  • Redis原理-IO模型和持久化
  • PID控制示例
  • GoLand GC(垃圾回收机制)简介及调优
  • AI:40-基于深度学习的森林火灾识别
  • 37基于MATLAB平台的图像去噪,锐化,边缘检测,程序已调试通过,可直接运行。
  • 通过Metasploit+Ngrok穿透内网长期维持访问外网Android设备
  • STM32 CubeMX配置USB HID功能,及安装路径
  • 【错误解决方案】ModuleNotFoundError: No module named ‘transformers‘
  • Mac 配置环境变量
  • 如何在linux服务器上安装Anaconda与pytorch,以及pytorch卸载
  • ansble