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

这篇具有很好参考价值的文章主要介绍了Mac 安装psycopg2,报错Error: pg_config executable not found.。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

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

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

报错信息如下:文章来源地址https://www.toymoban.com/news/detail-720752.html

Collecting psycopg2
  Using cached psycopg2-2.9.9.tar.gz (384 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running egg_info
      creating /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info
      writing /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/dependency_links.txt
      writing top-level names to /private/var/folders/sn/4zg1p0495lq98d4qtk5qghw40000gn/T/pip-pip-egg-info-12j51cdv/psycopg2.egg-info/top_level.txt
      writing 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 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>).
      
      [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.

到了这里,关于Mac 安装psycopg2,报错Error: pg_config executable not found.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Mac安装Dart时,Homebrew报错 Error: Failure while executing

    最近准备开发Flutter项目时,在安装环境时,安装Homebew时遇到了以下报错信息,在这里分享一下。 安装 ARM 版 Homebrew ARM版Homebrew最终被安装在/opt/homebrew路径下。 直接执行: 然后还需设置环境变量,具体操作步骤如下,一定要仔细阅读。 在终端执行命令echo $SHELL获得终端类型

    2024年02月10日
    浏览(48)
  • 解决mac安装navicat保存密码报错(Failed to save password Error code: -34018)

    我们在mac安装navicat15.0.20.1以上,创建连接的时候保存密码报错: Failed to save password Error code: -34018, 以下是我的解决方案及安装包和汉化包: 链接: https://pan.baidu.com/s/1WfSZXrz8JR5vwd83enWALA?pwd=9hpf 提取码: 9hpf 1.我安装的navicat版本是15.0.22,创建mysql连接保存的时候有以上问题 2.安装版本为

    2024年02月16日
    浏览(54)
  • 报错:Parsing error: No Babel config file detected...的解决方案

    报错:Parsing error: No Babel config file detected for E:前端学习资料9.vue基础classday03\\02-源代码\\01-componentvue.config.js. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files. 报错方法解决 vue.config.js文件或babel.config.js文件或src中APP.vue开头有 红色

    2023年04月22日
    浏览(39)
  • 【已解决】vue报错:Parsing error: No Babel config file detected for...

    Vue项目报错:Parsing error: No Babel config file detected… 解决方法:在 package.json 里面添加 \\\"requireConfigFile\\\": false 即可。

    2024年02月15日
    浏览(35)
  • springboot整合Nacos配置中心报错create config service error!properties=Nacos

    描述:最近在整合谷粒商城项目的过程中发现一个问题, create config service error!properties=NacosConfigProperties{serverAddr=\\\'null\\\', encode=\\\'null\\\', group=\\\'DEFAULT_GROUP\\\', prefix=\\\'null\\\', fileExtension=\\\'properties\\\', timeout=3000, endpoint=\\\'null\\\', namespace=\\\'null\\\', accessKey=\\\'null\\\', secretKey=\\\'null\\\', contextPath=\\\'null\\\', clusterName=\\\'null\\\'

    2024年02月14日
    浏览(25)
  • Parsing error: No Babel config file detected for xxx Either disable config file checking...报错解决方法

    使用Vue3创建项目,创建完成后发现会报错,如下图: 翻译了一下,其实已经告诉我们解决方法了: Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files. 意思是:使用requireConfigFile:false禁用配置文件检查,或者配置Babel以便它可以找到

    2023年04月09日
    浏览(36)
  • mac 安装docker-compose报错,/usr/local/bin/docker-compose: line 1: {error:Document not found}:

    问题: mac 安装docker-compose报错 {error:Document not found}: command not found 解决方案: Mac 的 Docker 桌面版和 Docker Toolbox 已经包括 Compose 和其他 Docker 应用程序,因此 Mac 用户不需要单独安装 Compose。 docker-compose 指令 改成 docker compose 即可 例如

    2024年02月11日
    浏览(38)
  • vue H5跳转小程序报错:config:fail,Error: 系统错误,错误码:63002,invalid signature

    【相关文档】 微信开发者工具下载地址与更新日志 微信网页开发 /JS-SDK说明文档 微信 JS 接口签名校验工具 全局返回码说明 H5跳转小程序报错:config:fail,Error: 系统错误,错误码:63002,invalid signature,如下: 查看文档:错误码:63002,invalid signature 表示无效的签名: 确认签名算

    2024年02月16日
    浏览(37)
  • 当zookeeper报错Invalid config, exiting abnormally,Error contacting service. It is probably not running

    配置版本 zookeeper-3.4.6 hadoop-2.7.7 jdk1.8/jdk8 centos7 当你启动zookeeper报错可以先试以下方法  或者Error contacting service. It is probably not running server.~master:2888:3888 server前后是否有空格(复制容易犯这个错误) 一种是该文提到的(详情可点击该链接)(17条消息) 成功解决ZooKeeper配置中出现Err

    2024年02月06日
    浏览(43)
  • 解决docker运行redis报错:Fatal error, can‘t open config file /etc/redis/redis.conf以及启动redis后自动退出容器

    现象如下:  看了报错是权限问题,然后发现redis1.conf的权限果然不大对, 所以运行 chmod o+r 添加权限 但是启动后容器自动退出: 然后把redis-server改成绝对路径/usr/local/bin/redis-server  此时就能发现报错真正的原因:是原始redis.conf配置文件内容的问题,而不是文件本身挂载的

    2024年02月04日
    浏览(43)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包