系统相关
首页 > 系统相关> > python – 无法在centos上安装psycopg2

python – 无法在centos上安装psycopg2

作者:互联网

我使用pip和easy_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

真的需要你的帮助..

解决方法:

编辑:我第一次读到’pgconfig’,而不是’pyconfig’.

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

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

(如果你没有安装,你仍然需要postgresql-devel包)

标签:python,centos,centos5,openerp
来源: https://codeday.me/bug/20190718/1494570.html