编译
cd Python-2.7.8 ./configure --prefix=/usr/local #指定了目录,如果不制定,可以使用默认的,直接运行 ./configure 即可。 make&&sudo make install
安装好之后,进入shell,输入python,会看到如下:
qw@qw-Latitude-E4300:~$ python
Python 2.7.6 (default, Nov 13 2013, 19:24:16) #后来我升级到2.7.8了,就是用后面讲到的源码安装方法
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>我用的是python2.7.6,或许你的版本号更高。这些差别就不用纠结了。