码迷,mamicode.com
首页 > 编程语言 > 详细

安装python 2.7.11

时间:2016-04-08 01:06:52      阅读:504      评论:0      收藏:0      [点我收藏+]

标签:version   against   enables   include   python   

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/

安装python 2.7.11

标签:version   against   enables   include   python   

原文地址:http://wl133.blog.51cto.com/9410504/1761506

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!