pip 安装 psycopg2 安装及错误

现象:

Error: pg_config executable not found.

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'.
Complete output from command python setup.py egg_info:
running egg_info creating pip-egg-info/psycopg2.egg-info writing pip-egg-info/psycopg2.egg-info/PKG-INFO writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found

解决方法

1、安装libpq-dev

sudo apt-get install libpq-dev python-dev

2、pip安装
···
pip install psycopg2
···

了解更多,请关注公众号

Error: pg_config executable not found.的更多相关文章

  1. 在linux上安装psycopg2出错--Error: pg_config executable not found.

    这个错误可能是因为缺少PGSQL的相关库吧. 网上有很多解决办法,我最终用以下方式解决: yum install postgresql postgresql-devel python-devel

  2. 安装psycopg2时出错:Error: pg_config executable not found.

    红帽系: 安装postgresql-devel Debian系: 安装libpq-dev

  3. pg_config executable not found

    Error: pg_config executable not found. Please add the directory containing pg_config to the PATH or ...

  4. macos开发pgsql数据库

    mac安装Postgresql作为数据库 最简单的方式是安装Postgres.App. 这个应用里自带了最新版本的PostgreSQL而且不需要学习数据库服务器启动和关闭的命令.程序安好后(别忘了拖拽 ...

  5. Ubuntu14.04部署pyspider的过程

    1.安装,安装官方文档,应该先执行 sudo apt-get install python python-dev python-distribute python-pip libcurl4-opens ...

  6. 选择 Python3.6 还是 Python 3.7

    转自:白月黑羽在线教程:http://www.python3.vip/doc/blog/python/home/ 选择 Python3.6 还是 Python 3.7 Python 3.7 已经发布了 ...

  7. 安装配置postgreSQL+pgcli+pgadmin3

    记录了postgreSQL数据库的完整的安装配置过程,以及postgreSQL的pgcli命令行智能提醒扩展,pgadmin3图形化管理客户端的配置安装.此postgresql是bigsql版安装详情 ...

  8. PIP本地源搭建

    Wheel包制作 # pip install wheel # mkdir ~/wheels # cd < Project > # pip wheel --wheel-dir=~/wheel ...

  9. DevStack部署OpenStack开发环境 - 问题总结

    建议在使用DevStack搭建OpenStack开发环境前,先安装好开发工具包组.特别是gcc,主要一定是在yum update -y 之前,否则更新完系统后,在安装开发工具包会出现很多依赖包因为版本 ...

随机推荐

  1. mysql-2-where

    #进阶2:条件查询 /* 语法: SELECT 查询列表 FROM 表名 WHERE 筛选条件 分类: 1.按条件表达式筛选:> < = != <> >= <= 2 ...

  2. java 反射之静态and动态代理

    首先说一下我们什么情况下使用代理? (1)设计模式中有一个设计原则是开闭原则,是说对修改关闭对扩展开放,我们在工作中有时会接手很多前人的代码,里面代码逻辑让人摸不着头脑(sometimes the c ...

  3. 2014年 实验三 B2B模拟实验(一)

    [实验目的] ⑴.熟悉企业网络银行和电子证书的应用 ⑵.通过B2B模拟实验掌握B2B的交易过程 [实验条件] ⑴.个人计算机一台 ⑵.计算机通过局域网形式接入互联网 (3).电子商务模拟实验室软件包. ...

  4. 使用Python对植物大战僵尸学习研究

    根据上一篇 使用Python读写游戏1 中,使用Python win32库,对一款游戏进行了读内存 操作. 今天来写一下对内存进行写的操作 正文 要进行32位的读写,首先了解一下要用到的几个函数,通过 ...

  5. MeteoInfoLab脚本示例:计算水平螺旋度

    尝试了用MeteoInfoLab编写计算水平螺旋度的脚本,结果未经验证.脚本程序: print 'Open data files...' f_uwnd = addfile('D:/Temp/nc/uw ...

  6. Django创建表时报错django.db.utils.InternalError: (1366问题解决记录

    问题出现 执行Python manage.py makemigrations生成创建表的py文件 执行python manage.py migrate创建数据表 界面出现报错 问题原因 网上搜索原因, ...

  7. Seaborn中几种作图方式

    趋势 sns.pointplot - 点图 ,比折线图好使 sns.lineplot - 折线图最适合显示一段时间内的趋势,多条线可以用来显示多个组中的趋势. 关系 - 可以使用许多不同的图表类型来理 ...

  8. Linux命令之date +%F

    date命令显示当前日期 date +%F显示当前日期 [10:02:52 root@C8[ 2020-06-16DIR]#touch `hostname`_`date +%F`.log [10:03 ...

  9. 编译安装tree命令

    查看当前的tree [12:33:33 root@C8[ ~]#rpm -qi tree Name : tree Version : 1.7.0 Release : 15.el8 Architectu ...

  10. Java安全之Commons Collections3分析

    Java安全之Commons Collections3分析 文章首发:Java安全之Commons Collections3分析 0x00 前言 在学习完成前面的CC1链和CC2链后,其实再来看CC3 ...