Memo notes:
Yum-y groupinstall ' Development Tools '
Yum-y Install openssl-devel* ncurses-devel* zlib*.x86_64
Yum-y Install bzip2 bzip2-devel bzip2-libs
Download tar.gz file for Python 2.7.8
./configure--prefix=/usr/local/python && make && make install
Rm/usr/bin/python
Ln-s/usr/local/python/bin/python2.7/usr/bin/python
Verify $python-V
Solving the Yum failure problem
# Vim/usr/bin/yum
#!/usr/bin/python
Change into
#!/usr/bin/python2.4
-------------------------------
At the beginning of the installation of the python2.7.3, after successful installation, run Django Error:
Importerror:no module named _sqlite3
Follow the universal solutions on the Web:
Yum Install Sqlite-devel
and re-installed the python2.7.3, no use--prefix
But still did not solve this problem, always can not find python-2.7.3/lib/python2.7/lib-dynload/_sqlite3.so.
Personal suspicion is the version of Python 2.7.3.
So the installation of python2.7.8, still did not solve the problem, but there are python-2.7.8/lib/python2.7/lib-dynload/_sqlite3.so.
validation, import sys
Print Sys.path
See the referenced path is the path under/usr/local/lib, summed up the following point of view, if/usr/local/lib under Python, the system will automatically use this Python, Instead of using Python from the directory you--prefix installed to, you run python-v after you've built a soft connection to be the result.
Import Sqlite3 works correctly after removing all previously installed Python under/usr/local/.
centos5.8 upgrade python2.4.3 to Python 2.7.8