pythonbrew令合集

pythonbrew

pythonbrew command [options]

安装不同版本的python

pythonbrew install --verbose 2.7.2
pythonbrew install --test 2.7.2
pythonbrew install --test --force 2.7.2
pythonbrew install --configure="CC=gcc_4.1" 2.7.2
pythonbrew install --no-setuptools 2.7.2
pythonbrew install http://www.python.org/ftp/python/2.7/Python-2.7.2.tgz
pythonbrew install /path/to/Python-2.7.2.tgz
pythonbrew install /path/to/Python-2.7.2
pythonbrew install 2.7.2 3.2

永久使用某版本python

pythonbrew switch 2.7.2
pythonbrew switch 3.2

在当前shell下使用某版本python

pythonbrew use 3.4.3

用某版本或所有版本python运行一个python文件

pythonbrew py test.py
pythonbrew py -v test.py # Show verbose output
pythonbrew py -p 2.7.2 -p 3.2 test.py # Use the specified pythons

列出已安装的python

pythonbrew list

列出可安装的python

pythonbrew list -k

卸载某版本python

pythonbrew uninstall 2.7.2
pythonbrew uninstall 2.7.2 3.2

删除源文件存档:

pythonbrew cleanup

更新pythonbrew

pythonbrew update
pythonbrew update --master
pythonbrew update --develop

禁用pythonbrew

pythonbrew off

添加或删除python符号链结

pythonbrew symlink # Create a symbolic link, like "py2.7.2", for each installed version
pythonbrew symlink -p 2.7.2
pythonbrew symlink pip # Create a symbolic link to the specified script in bin directory
pythonbrew symlink -r # Remove a symbolic link
pythonbrew symlink -v foo # Create a symbolic link to the specified virtual environment python in bin directory

运行buildout

pythonbrew buildout
pythonbrew buildout -p 2.6.6

基于virtualenv创造一个虚拟python环境

pythonbrew venv init
pythonbrew venv create proj
pythonbrew venv list
pythonbrew venv use proj
pythonbrew venv delete proj
pythonbrew venv rename proj proj2
pythonbrew venv clone proj proj2

github主页:https://github.com/utahta/pythonbrew