Wednesday, April 24, 2013

Centos 6.2 安装 Pythonbrew

安装pythontools
# yum install gcc patch zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
# yum groupinstall "Development tools"
# yum install python-setuptools
安装pythonbrew
# easy_install pythonbrew
初始化pythonbrew环境
# su - [username]
$ pythonbrew_install
根据提示修改.bashrc
$ echo "source ~/.pythonbrew/etc/bashrc" >> ~/.bashrc

列出可安装的Python版本
$ pythonbrew list --know
安装python
$ pythonbrew install 2.7.3
创建虚拟环境

$ pythonbrew venv create [env_name] -p 2.7.3
使用创建的虚拟环境
$ pythonbrew venv use [env_name]













No comments:

Post a Comment