一般linux自带python2,如果需要python3以上版本,可以不需要卸载自带的python2,二者可以共存.只需要配置相应的环境变量即可. 具体回答可以参考这篇文章 https://stackoverflow.com/questions/26282986/how-to-update-python-2-7-to-python-3-in-linux 其内容是: Python 2 and 3 can safely be installed together. They install most…
Linux安装Python2.7 以下例子基于python 2.7.9,其他版本同理.# 1.下载python# wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz 2.解压.编译安装(依次执行以下5条命令)# tar -zxvf Python-2.7.9.tgz cd Python-2.7.9 ./configure --prefix=/usr/local/python-2.7.9 make make install 3.…