去年双十一阿里云活动,廉价买了台ECS一直闲着没用,实在是资源浪费。突然想装个Jupyter Notebook,方便对机器的使用,希望能调动积极性。一看python的版本信息,居然是2.7.12的,所以第一步先把Python升级到Python3再说。
1. 查看Python版本
root@iZuf6e9bjg74ll9e9hcyagZ:~# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
2. 下载Python3代码包
root@iZuf6e9bjg74ll9e9hcyagZ:~# pwd
/root
root@iZuf6e9bjg74ll9e9hcyagZ:~# mkdir python
root@iZuf6e9bjg74ll9e9hcyagZ:~# ls
anaconda python
root@iZuf6e9bjg74ll9e9hcyagZ:~# cd python/
root@iZuf6e9bjg74ll9e9hcyagZ:~/python# ls
root@iZuf6e9bjg74ll9e9hcyagZ:~/python# wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz

本文详细介绍了如何在阿里云ECS实例上将Python从2.x版本升级到3.x版本,包括查看当前版本、下载Python3代码包、解压并编译安装、备份Python2、创建软链接以及验证升级是否成功。

803

被折叠的 条评论
为什么被折叠?



