list123342 发表于 2018-8-11 09:22:09

升级安装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 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/
页: [1]
查看完整版本: 升级安装python 2.7.11