升級安裝python 2.7.11

rehat 6.5 安裝python2.7.11(系統裏已存在2.6)
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tar.xz
tar [J]xvf Python-2.7.11.tar.xz
cd Python-2.7.11
./configure --prefix=/usr/ --enable-shared --with-system-expat --with-system-ffi --enable-unicode=ucs4 && make && make install
echo $?
chmod -v 755 /usr/lib/libpython2.7.so.1.0
vim /etc/ld.so.conf
添加include  /usr/lib
/sbin/ldconfig
/sbin/ldconfig -v
python

--with-system-expat: This switch enables linking against system version of Expat.
--with-system-ffi: This switch enables linking against system version of libffi. Remove if you have not installed libffi-3.2.1.
--enable-unicode=ucs4: This switch enables 32bit Unicode support in Python.
要求python編譯的時候,需要有動態鏈接庫即加上--enable-shared

將tab.py放到/usr/lib/python2.7/site-packages/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章