понедельник, 8 октября 2012 г.

Замена Python 2.4 на Python 2.7. SQLite. CentOS

ИСПОЛЬЗУЙ VIRTUALENV!

-bash-3.2# uname -i
i386

-bash-3.2# cat /etc/redhat-release
CentOS release 5.7 (Final)

bash-3.2# python -V
Python 2.4


-bash-3.2# wget http://python.org/ftp/python/2.7/Python-2.7.tgz


-bash-3.2# tar xfz Python-2.7.tgz

 ВАЖНО: Сначала установи SQLite, sqlite-devel, потом компилируй питон

-bash-3.2# cd Python-2.7 &&./configure --prefix=/usr/bin/python2.7 --with-threads --enable-shared  && make && make install

bash-3.2# alias python='/usr/bin/python2.7/bin/python'

Костыль:
bash-3.2# mv /usr/bin/python /usr/bin/python_bckp
bash-3.2# ln -s /usr/bin/python2.7/bin/python /usr/bin/python


bash-3.2# python -V
Python 2.7

bash-3.2# python
Python 2.7 (r27:82500, Oct  8 2012, 05:19:05)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.version
'2.6.0'










Комментариев нет:

Отправить комментарий