Ubuntu 10.04 安装 Python 2.7

本文详细介绍了如何在Ubuntu 10.04上将默认的Python 2.6.5升级到2.7.6。升级过程包括下载Python源码,解决依赖问题,以及安装第三方Python包如pyOpenSSL的步骤。在升级过程中可能会遇到缺少-dev包的警告,可以通过安装libreadline-dev和libgdbm-dev来解决。
摘要由CSDN通过智能技术生成

Recently I went back to my Ubuntu 10.04 machine, and realized the default Python version is 2.6.5. So I decided to upgrade it to 2.7. At first I thought it was just a few clicks in the Synaptic, but it turned out to be needing a little bit more effort.



STEP 1. Go to 

http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz

to download the most recent gzipped source tar ball. Then extract the files, cd to the extracted Python-2.7.6 folder, and do

./configure
make
sudo make install

The 'make install' by default will install Python 2.7.6 to /usr/local/bin and /usr/local/lib, while the Python 2.6.5, the one that is originally shipped with Ubuntu 10.04, is located in /usr/bin and /usr/lib. It appears that  /usr/local/bin/python takes precedence over 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值