zoukankan      html  css  js  c++  java
  • linux下升级python版本

    linux下升级python版本

    下载python最新版本2.7.13并编译安装

    <pre>
    wget https://www.python.org/ftp/python/2.7.12/Python-2.7.13.tar.xz
    xz -d Python-2.7.13.tar.xz
    tar xf Python-2.7.13.tar
    cd Python-2.7.13
    ./configure --prefix=/usr/local/python-2.7.13
    make
    make install
    </pre>


    Python-2.7.13 会安装在 /usr/local/python-2.7.13 目录下

    系统自带的 Python 是在 /usr/bin 目录下


    <pre>
    ll -tr /usr/bin/python*

    /usr/bin/python2.6-config
    /usr/bin/python2.6
    /usr/bin/python
    /usr/bin/python2 -> python
    /usr/bin/python-config -> python2.6-config
    </pre>


    更新系统默认 Python 版本
    备份旧的python

    <pre>

    mv /usr/bin/python /usr/bin/python2.6.6
    mv /usr/bin/python-config /usr/bin/python2.6-config

    ln -s /usr/local/python-2.7.13/bin/python2.7 /usr/bin/python
    ln -s /usr/local/python-2.7.13/bin/python-config /usr/bin/python-config
    ln -s /usr/local/python-2.7.13/bin/python2.7 /usr/bin/python2.7
    </pre>


    查看新的 Python 版本

    <pre>
    python --version
    Python 2.7.13
    </pre>

  • 相关阅读:
    git ssh keys
    git 修改 email
    git 撤销commit
    企微调试模式
    ORACLE 根据某个字段固定值进行分区
    Apache FtpClient login失败
    Oracle序列
    Oracle merage into
    Oracle all_tables 以及常用sql
    性能优化-使用高性能的库fastutil
  • 原文地址:https://www.cnblogs.com/newmiracle/p/11856324.html
Copyright © 2011-2022 走看看