修改默认python版本为3.x

🌞安装

  1. 打开WEB浏览器访问 https://www.python.org/downloads/source/
  2. 选择适用于 Unix/Linux 的源码压缩包。
  3. 下载及解压压缩包 Python-3.x.x.tgz,3.x.x 为你下载的对应版本号。
  4. 如果你需要自定义一些选项修改 Modules/Setup
  5. 以 Python3.6.1 版本为例:

    1
    2
    3
    4
    # tar -zxvf Python-3.6.1.tgz
    # cd Python-3.6.1
    # ./configure
    # make && make install
  6. 检查 Python3 是否正常可用:# python3 -V

继续阅读全文 »