【pip install psycopg2安装报错】Error: pg_config executable not found.
背景
在pip install psycopg2-binary 的时候报错了。错误内容如下。
Collecting psycopg2-binaryUsing cached psycopg2-binary-2.8.6.tar.gz (384 kB)ERROR: Command errored out with exit status 1:command: 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bkabu6av/psycopg2-binary/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bkabu6av/psycopg2-binary/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 /tmp/pip-pip-egg-info-ez6k71_8scwd: /tmp/pip-install-bkabu6av/psycopg2-binary/Complete output (23 lines):running egg_infocreating /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-infowriting /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/PKG-INFOwriting dependency_links to /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/dependency_links.txtwriting top-level names to /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/top_level.txtwriting manifest file '/tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.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>).----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
原因分析
从报错的提示来看,是系统不知道pg_config的路径,需要把这个路径添加到PATH当中。但我们并不能找到这个路径在哪。那么我们就前往官网看看
但我的系统里面并不能找到这个包。而是另外一个包 postgresql-devel
解决办法
yum install postgresql-devel
【pip install psycopg2安装报错】Error: pg_config executable not found.相关推荐
- Python pip install 安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法
Python pip install 安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法 文章目录 ...
- pip install pygame安装报错解决方案
针对pip install pygame安装报错的两种不同的解决方法: 一:若python中已经安装好了pip,但pip install pygame却报错的话,可以尝试以下步骤: (1)开始,输入c ...
- pip install pyinstaller安装报错
在学习python时,需要用到pyinstal库,将.py文件转化为.exe可执行文件.在windows下cmd命名行中,使用pip install pyinstaller安装,但是在安装时遇到报错: ...
- Python 命令pip install pygame安装报错
报错1如下: Traceback (most recent call last):File "c:\users\administrator\appdata\local\programs\py ...
- pip install urllib3[secure] 报错 error: ffi.h: No such file or directory
解决 sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging pyt ...
- python无法安装第三方库read time out_解决pip install的时候报错timed out的问题
安装包的时候报错,执行:pip install pyinstaller 问题: File "c:\python\python35\lib\site-packages\pip\_vendor\ ...
- Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No s
2019独角兽企业重金招聘Python工程师标准>>> 本文为大家讲解的是Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such ...
- npm安装报错Error: EPERM: operation not permitted解决方案
电脑重装系统后重新配置环境安装node后,npm命令安装报错 Error: EPERM: operation not permitted npm ERR! code EPERM npm ERR! sy ...
- 2021-10-24 CMake安装报错Error when bootstrapping CMake: Cannot find appropriate C compiler on this syst
一.报错 Error when bootstrapping CMake: Cannot find appropriate C compiler on this system. Please speci ...
最新文章
- STM32 SPI难点浅析
- IntelliJ IDEA2017 修改缓存文件的路径(转载:https://www.cnblogs.com/acm-bingzi/p/ideaCachePath.html)
- C#鼠标右键弹出菜单
- 【2017年第1期】基于外卖物流配送大数据的调度系统
- python基础-深浅拷贝
- 389 Find the Difference 找不同
- 几个与IP地址类型有关的术语
- SAP License:SAP财务管理的认识
- window.opener的用法
- iOS从零开始学习直播之音频4.歌词
- uva 563(最大流)
- 名字隐藏问题(C++)
- dell服务器分区表修复,完美恢复原产Dell Recovery软件、修复环境(添加教程)
- mysql数据库去重
- 新版DAEMON Tools Lite打不开 bin 文件解决方法
- 更新最大内码,金蝶开发
- SVN客户端 创建分支/合并分支/切换分支
- php学习笔记-php运算符,类型转换,打印输出语句相较于其他语言的特殊部分-day02
- CSDN、掘金、简书博客文章如何转为Markdown?
- JDBC:事物管理与事物隔离界别
热门文章
- 【opencv4】opencv视频教程 C++ 6、图像混合、线性混合、混合权重相加addWeighted()、混合加add()、混合乘multiply()
- UNIX Domain Socket(UDS)是什么?同一台主机间进程间通信
- ubuntu禁用锁屏
- pycharm的演示模式、无干扰模式、全屏模式(presentation mode、distraction free mode、full screen mode)
- python numpy.ones(shape, dtype=None, order=’C’) empty(shape[, dtype, order]) empty_like(a) 空数组 全1数组
- Java中的主类概念以及public static void main方法的分析
- vivo手机解锁工具_屏幕指纹优势凸显,vivo持续研发致力打造全屏指纹解锁
- CentOS7安装JDK1.8简单体验(java开发必备)
- python线程暂停_关于多线程:如何使“停止”按钮终止已经在Tkinter中运行的“开始”功能(Python)...
- ipad写python_ipad怎么写python