2011年5月24日

python on Centos 5

最近幫自己的舊筆電(x24)灌回了Centos 5, 其python還停留在2.4.
為了要能夠用app engine, python要2.5以上.
最後使用的方法是到python.org下載2.7 source code,
confgure
make
make altinstall
就可以並存了, 預設安裝的目錄會跟原本系統內的不同, 於/usr/local/bin/python2.7
接下來需要利用alternatives指令來修改預設的python執行檔-->/usr/bin/python
格式: alternatives  [options]  --install  link  name  path  priority
將原本的2.4和新的2.7都建入alternatives的資料庫中
alternatives --install /usr/bin/python python /usr/bin/python2.4 200
alternatives --install /usr/bin/python python /usr/local/bin/python2.7 400
由於數字大者優先權高, 所以python2.7會被選取囉

沒有留言:

coap-client 4.3.0 Windows build

coap-client  is a  wget -like tool to generate simple requests for retrieval and modification of resources on a remote server.  Got the sour...