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. Spring Environment对象获取属性

    String[] activeProfiles = env.getActiveProfiles();//获取当前是启用哪一个个配置文件 System.out.println(Arrays.toStri ...

  2. Vue学习笔记使用系列一【表单】

    脚手架的搭建,请查看另外一篇日记:https://www.cnblogs.com/Fengge518/p/11837078.html 1:直接代码了 1 <!DOCTYPE html> 2 ...

  3. Apache HTTP Server 2.2.34安装

    Windows 下载 安装方式有自己编译源码和下载别人编译好的,这里选择从第三方下载,官网地址http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/bin ...

  4. Python练习题 006:输出九九乘法表

    [Python练习题 006] 输出九九乘法表 --------------------------------------------------- 照理这题不难,逻辑关系弄对了就好办,但数学渣的我 ...

  5. c语言gets函数

    函数gets的原型为:char*gets(char*buffer); 在 stdio.h中定义,如果要程序中用到此函数需包含#include<stdio.h> gets()函数用来从标准输 ...

  6. 用cmd下载tp5.0版本

    1.首先进入phpstudy的www目录 composer create-project topthink/think=5.0.* pt5.0的名字 --prefer-dist $ composer ...

  7. 学习WebDav

    目录 前言 初识WebDav 有哪些支持webdav的网盘? WebDAV的特性和优势 服务端的搭建 调用WebDav接口 PROPFIND方法 PROPPATCH方法 MKCOL方法 PUT方法 G ...

  8. Azure Media Player Logo隐藏和 视频字幕样式

    <style type="text/css"> /**hide mediaplayer logo*/ .amp-default-skin .amp-content-ti ...

  9. GC调优-XX:PrintGCDetails深度解析

    查看程序运行GC的运行情况 资源充足的GC情况 新生代 老年代 元空间 因为现在资源充足没有发生GC *案例:将JVM初始化内存与最大内存(防止内存抖动,反复GC)调至10m,new一个50m的数组对 ...

  10. 多测师讲解自动化测试 _RF封装_(三层模式)高级讲师肖sir

    rf自动化:分层作用: 1.项目----有重复的流程(借款-登录,出借-登录) 2.借款--登录(8个流程)机器人:案例层(用例)写在机器人中,1个机器人=1条用例 分三个层次: 1.案例层(存放用例 ...