我在我的上安装了python2.7
centos 2.6.32-431.17.1.el6.x86_64
遵循以下指示:
http://tooomuchdata.com/2014/02/16/how-to-install-python-on-centos/
#after the yum stuff...
# Python 2.7.6:
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall
我正在尝试安装 psycopg2:
[stuff]# pip2.7 install psycopg2
...
./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory
经过研究,这意味着我需要安装 python-devel (我认为),但我无法安装它,因为它会在系统上默认安装我的 2.6。
我尝试从源安装:
[stuff]# python2.7 ./external_dependancies/psycopg2-2.5.3/setup.py install
Traceback (most recent call last):
File "./external_dependancies/psycopg2-2.5.3/setup.py", line 474, in <module>
use_pydatetime = int(parser.get('build_ext', 'use_pydatetime'))
File "/usr/local/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'build_ext'
我需要做什么才能在我的系统上安装 python-devel (或者更好的是 psycopg2)
答案1
我丢失了这个包:
libpqxx-devel.x86_64