Linux安装python环境方法

  • 1. wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz

     2. 解压:tar -xvf Python-2.7.11.tgz

     3.cd Python-2.7.11

     4. ./configure

    会在目录下面生成makefile文件,这个makefile主要是为make使用。

     5.make 

    编译源代码,生成执行文件

     6.make install

    把生成的可执行文件,拷贝到系统目录下

  • cd /usr/bin/
    rm -rf python
    ln -s /usr/local/Python-x.x.x/bin/python ./python
原文地址:https://www.cnblogs.com/cbreeze/p/5927959.html