Python 3.2.1 on OEL 6.1

--
-- Installing python 3.2.1 on OEL 6.1 from source
--
$ sudo yum install tk-devel gdbm-devel
$ mkdir python
$ cd python
$ export http_proxy=acme.proxy.com:80
$ wget http://www.python.org/ftp/python/3.2.1/Python-3.2.1.tgz
$ tar xvzf Python-3.2.1.tgz
$ cd Python-3.2.1
$ ./configure --prefix=/opt/python3.2
$ make
$ make test
$ sudo make install
$ sudo ln -s /opt/python3.2/bin/python3.2 /usr/bin/python32
$ sudo ln -s /opt/python3.2/bin/idle3.2 /usr/bin/idle-python32

-- cx_Oracle is (of course) mandatory library 
$ mkdir cx_Oracle
$ cd cx_Oracle
$ wget http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-5.1.tar.gz?download
$ tar xvzf cx_Oracle-5.1.tar.gz
$ cd cx_Oracle-5.1
$ sudo -s
# . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
# export LD_LIBRARY_PATH=$ORACLE_HOME/lib
# python32 setup.py build
# python32 setup.py install

-- lxml 2.3
-- libxml2 and libxslt1.1 libraries were already installed
-- on OEL 6.1, so it was as easy as downloading lxml from PyPI
-- and installing with:

$ tar xvzf lxml-2.3.tar.gz
$ cd lxml-2.3
$ python32 setup.py build
$ sudo python32 setup.py install

-- run test:
$ python32
>> from lxml import etree
>> print(etree.LXML_VERSION)
>> print(etree.LIBXML_VERSION)
>> print(etree.LIBXSLT_VERSION)

Posted on 12.07.2011, in Linux, PostgreSQL, etc. and tagged , . Bookmark the permalink. Comments Off on Python 3.2.1 on OEL 6.1.

Comments are closed.