【问题标题】:can't install psycopg2 on centos [closed]无法在centos上安装psycopg2 [关闭]
【发布时间】:2012-10-06 04:55:24
【问题描述】:

我使用pipeasy_install

我收到此错误消息:

Downloading/unpacking psycopg2

Running setup.py egg_info for package psycopg2

error: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)

Complete output from command python setup.py egg_info:

running 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

warning: manifest_maker: standard file '-c' not found

error: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2

Storing complete log in /root/.pip/pip.log

真的需要你们的帮助..

【问题讨论】:

    标签: python centos openerp centos5


    【解决方案1】:

    已编辑:我第一次将其读为“pgconfig”,而不是“pyconfig”。

    如果您缺少 pyconfig.h,那么您可能缺少 Python 开发包。

    尝试yum install python-devel,然后再次安装 psycopg2。

    (如果您没有安装 postgresql-devel 软件包,您仍然需要它)

    【讨论】:

    • 我做到了。但是当我试图查看/usr/include/python2.6 时,没有文件夹python2.6。我在/usr/bin/ 下只有python2.6 文件夹,我该怎么办?
    • 查看这篇文章的编辑;您可能缺少的不是 postgresql-devel,而是 python-devel。
    • 只需安装“yum install postgresql-devel”并尝试重新安装 PSYCOPG2
    猜你喜欢
    • 2017-05-27
    • 2013-02-03
    • 2013-04-01
    • 2013-02-09
    • 2011-05-31
    • 1970-01-01
    • 2020-10-20
    • 2016-03-16
    • 2013-06-02
    相关资源
    最近更新 更多