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. springboot项目根据不同的环境启动不同的配置,如开发环境dev,测试环境sit,生产环境application

    在项目开发中,会有多个环境,如在开发环境开发完,然后在测试环境测试,最后到生产环境,每个环境的配置是不一样的,如数据库配置:还好spring提供了一个管理配置的方式:

  2. Linux 串口工具 lsz lrz 移植

    //之前写的,刚才不小心误删了,所以重新再发出来. 1 下载源码包 首先下载最新版的lrzsz,地址:https://ohse.de/uwe/software/lrzsz.html.下面以 0.12. ...

  3. 部署项目到服务器 & 搭建博客网站

    搭建博客网站 作为名程序员,或者是网络编程爱好者,拥有一个自己的博客网站再好不过,本篇文章手把手教你部署自己的网站

  4. C++ CComboBox控件详解

    转载:http://blog.sina.com.cn/s/blog_46d93f190100m395.html C++ CComboBox控件详解 (2010-09-14 14:03:44) 转载▼ ...

  5. C#实例 武汉肺炎全国疫情实时信息图

    如果需要查看更多文章,请微信搜索公众号 csharp编程大全,需要进C#交流群群请加微信z438679770,备注进群, 我邀请你进群! ! ! --------------------------- ...

  6. day24 Pyhton学习 反射

    一.isinstance,type,issubclass issubclass() 这个内置函数可以帮我们判断x类是否是y类的子类 issubclass(x,y) class Base: pass c ...

  7. 以太坊PoW

    ethash ethash(eth+hash)是以太坊设计的挖矿算法,为了实现ASIC-resistance,ethash依赖于对内存资源的访问,是一种memory-hard函数.同时为了支持轻节点对 ...

  8. 用cgroup限制内存以防止Linux因内存用尽卡死

    Linux在内存用尽的情况下,整个界面,包括tty和ctrl-alt-F1都会卡住难以响应.虽然Linux内核有OOM Killer机制杀掉吃内存的进程,但经常内存用尽时连OOM Killer都无法动 ...

  9. spring boot:用dynamic-datasource-spring-boot-starter配置多数据源访问seata(seata 1.3.0 / spring boot 2.3.3)

    一,dynamic-datasource-spring-boot-starter的优势? 1,dynamic-datasource-spring-boot-starter 是一个基于springboo ...

  10. selenium 设置代理ip

    from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("--prox ...