天天看點

linux python 多版本安裝,linux 下 python多版本安裝方法

linux 下 python多版本安裝方法

釋出于 2014-12-28 10:31:04 | 551 次閱讀 | 評論: 0 | 來源: PHPERZ

Python程式設計語言Python 是一種面向對象、解釋型計算機程式設計語言,由Guido van Rossum于1989年底發明,第一個公開發行版發行于1991年。Python文法簡潔而清晰,具有豐富和強大的類庫。它常被昵稱為膠水語言,它能夠把用其他語言制作的各種子產品(尤其是C/C++)很輕松地聯結在一起。

本文為大家講解的是在linux 下實作 python多版本的安裝方法,感興趣的同學參考下。

Python簡介

Python 是一種面向對象、解釋型計算機程式設計語言,由Guido van Rossum于1989年底發明,第一個公開發行版發行于1991年。Python文法簡潔而清晰,具有豐富和強大的類庫。它常被昵稱為膠水語言,它能夠把用其他語言制作的各種子產品(尤其是C/C++)很輕松地聯結在一起。

多版本安裝

使用pythonbrew

easy_install pythonbrew

[[email protected] schirm]# pythonbrew_install

Well-done! Congratulations!

The pythonbrew is installed as:

/root/.pythonbrew

Please add the following line to the end of your ~/.bashrc

[[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc"

After that, exit this shell, start a new one, and install some fresh

pythons:

pythonbrew install 2.7.2

pythonbrew install 3.2

For further instructions, run:

pythonbrew help

The default help messages will popup and tell you what to do!

Enjoy pythonbrew at /root/.pythonbrew!!

[[email protected] schirm]# vim /root/.pythonbrew

[[email protected] schirm]# . ~/.bashrc

[[email protected] schirm]# pythonbrew install 2.7.2

Downloading Python-2.7.2.tgz as /root/.pythonbrew/dists/Python-2.7.2.tgz

######################################################################## 100.0%

Extracting Python-2.7.2.tgz into /root/.pythonbrew/build/Python-2.7.2

This could take a while. You can run the following command on another shell to track the status:

tail -f "/root/.pythonbrew/log/build.log"

Installing Python-2.7.2 into /root/.pythonbrew/pythons/Python-2.7

相關閱讀:

linux 下 python多版本安裝方法

linux 下實作python多版本安裝方法

Linux下Python MySQLdb子產品安裝過程及錯誤解決

Linux下Python安裝指南

Linux下編譯安裝MySQL-Python教程

Python MySQLdb Linux下安裝筆記

Windows下安裝python2和python3多版本教程

Linux下安裝Python3和django并配置mysql作為django預設伺服器方法

windows下Python安裝教程

Linux下安裝Python3

Python中pip安裝非PyPI官網第三方庫的方法

Linux下編譯安裝python3步驟