Overview ======== pythonbrew is a program to automate the building and installation of Python in the users $HOME. pythonbrew is inspired by `perlbrew `_ and `rvm `_. Installation ============ The recommended way to download and install pythonbrew is to run these statements in your shell:: curl -kL http://xrl.us/pythonbrewinstall | bash After that, pythonbrew installs itself to ~/.pythonbrew. Please add the following line to the end of your ~/.bashrc:: [[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc If you need to install pythonbrew into somewhere else, you can do that by setting a PYTHONBREW_ROOT environment variable:: export PYTHONBREW_ROOT=/path/to/pythonbrew curl -kLO http://xrl.us/pythonbrewinstall chmod +x pythonbrewinstall ./pythonbrewinstall For Systemwide(Multi-User) installation --------------------------------------- If the install script is run as root, pythonbrew will automatically install into /usr/local/pythonbrew. The pythonbrew will be automatically configured for every user on the system if you install as root. After installation, where you would normally use `sudo`, non-root users will need to use `sudopybrew`:: sudopybrew install -n -v -j2 2.7.2 Usage ===== pythonbrew command [options] Install some pythons:: pythonbrew install 2.7.2 pythonbrew install --verbose 2.7.2 pythonbrew install --force 2.7.2 pythonbrew install --no-test 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 Permanently use the specified python:: pythonbrew switch 2.7.2 pythonbrew switch 3.2 Use the specified python in current shell:: pythonbrew use 2.7.2 Runs a named python file against specified and/or all pythons:: 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 List the installed pythons:: pythonbrew list List the available installation pythons:: pythonbrew list -k Uninstall the specified python:: pythonbrew uninstall 2.7.2 pythonbrew uninstall 2.7.2 3.2 Remove stale source folders and archives:: pythonbrew cleanup Upgrades pythonbrew to the latest version:: pythonbrew update pythonbrew update --master pythonbrew update --develop Disable pythonbrew:: pythonbrew off Create/Remove a symbolic link to python (in a directory on your $PATH):: 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 Runs the buildout with specified or current using python:: pythonbrew buildout pythonbrew buildout -p 2.6.6 Create isolated python environments (uses virtualenv):: pythonbrew venv init pythonbrew venv create proj pythonbrew venv list pythonbrew venv use proj pythonbrew venv delete proj Show version:: pythonbrew version COMMANDS ======== install Build and install the given version of python. Install setuptools and pip automatically. switch Permanently use the specified python as default. use Use the specified python in current shell. py Runs a named python file against specified and/or all pythons. list List the installed all pythons. list -k List the available install pythons. uninstall Uninstall the given version of python. cleanup Remove stale source folders and archives. update Upgrades pythonbrew to the latest version. off Disable pythonbrew. symlink Create/Remove a symbolic link to python (in a directory on your $PATH) buildout Runs the buildout with specified or current using python. venv Create isolated python environments (uses virtualenv) version Show version. See more details below `pythonbrew help ` Changelog ========= 1.0 (2011-08-08) ---------------- - Added systemwide install support. (issue #31) - Fixed issue #41 Handle venv binary with the symlink command. - Improved `venv` command (without virtualenvwrapper) 0.9 (2011-07-21) ---------------- - Added `venv` command (uses virtualenv and virtualenvwrapper) - Added `buildout` command. 0.8 (2011-07-10) ---------------- - Fixed issue #21 Added Ubuntu 11.04(Natty) support - Fixed issue #24 non-framework python27 now defines environ properly. Thanks npinto. - Fixed issue #27 Cleanup of OS X python build flags - Fixed issue #28 Describe the 'symlink' command better. Thanks tgs. - Fixed issue #30 py command does not accept arguments with a space - Fixed bug: `pythonbrew off` need not have removed the symlink in bin directory - Added --no-test option to the install command - Added --verbose option to the install command - `pythonbrew clean` has been removed. Added `pythonbrew cleanup` instead. More ---- see the `pythonbrew/Changelog `_