pythonbrew

Python Environment manager

Github stars Tracking Chart

pythonbrew

CircleCI
Go Report Card
GitHub release

Note

This project is no longer under active development.

You can try to pyenv(under active development) instead of pythonbrew.

Overview

pythonbrew is the Python environments manager. it's easy to switch between them.

Inspired by perlbrew and rvm.

Installation

The recommended way to download from each releases and put it somewhere in your PATH.

Or you can get as below

go get -u github.com/utahta/pythonbrew/cmd/pythonbrew

Typically, pythonbrew install packages into ~/.pythonbrew.
If you want to install packages into somewhere else, you can do that by setting a PYTHONBREW_ROOT environment variable

export PYTHONBREW_ROOT=/path/to/.pythonbrew

Setup

Bash

Add the following line at the end of the ~/.bashrc file

eval "$(pythonbrew init)"

Zsh

Add the following line at the end of the ~/.zshrc file

eval "$(pythonbrew init)"

Usage

pythonbrew(pybrew) command [options]

Install some pythons

pythonbrew install 3.6.4
pythonbrew install -v 3.6.4
pythonbrew install -f 3.6.4
pythonbrew install -C "CFLAGS=-I/path/to/include" -C "LDFLAGS=-L/path/to/lib" 3.6.4
pythonbrew install --no-ensurepip 3.6.4
pythonbrew install --no-symlink 3.6.4
pythonbrew install https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
pythonbrew install 2.7.14 3.6.4

Use a specific Python version permanently

pythonbrew switch 2.7.14
pythonbrew switch 3.6.4

Use a specific Python version in the current shell

pythonbrew use 3.6.4

List all installed Python versions

pythonbrew list

List all known installable Python versions

pythonbrew list -k

Uninstall specific Python versions

pythonbrew uninstall 2.7.14

Disable pythonbrew

pythonbrew off

Manage environments (using virtualenv)

pythonbrew venv proj             # Create proj if not exists, Use proj if exists
pythonbrew venv -p 2.7.14 proj2
pythonbrew venv -l
pythonbrew venv --rm proj

Remove all cache

pythonbrew cleanup

Update pythonbrew to the latest version

pythonbrew update

Show version

pythonbrew -v

See more details

pythonbrew -h
pythonbrew <command> -h

Recommended Packages

Debian and Ubuntu

apt-get install zlib1g-dev libssl-dev libreadline-dev

Fedora, Red Hat and CentOS

yum install zlib-devel openssl-devel readline-devel

macOS

brew install openssl
brew install readline

Uninstallation

rm /path/to/pythonbrew
rm -rf ~/.pythonbrew

Remove eval "$(pythonbrew init)" line at the setup file.

Main metrics

Overview
Name With Ownerutahta/pythonbrew
Primary LanguageGo
Program languageShell (Language Count: 3)
Platform
License:MIT License
所有者活动
Created At2010-10-02 12:33:59
Pushed At2023-07-19 09:09:04
Last Commit At2020-02-11 18:22:10
Release Count20
Last Release Namev2.1.6 (Posted on )
First Release Name0.4 (Posted on 2010-10-27 22:52:46)
用户参与
Stargazers Count1.4k
Watchers Count74
Fork Count162
Commits Count290
Has Issues Enabled
Issues Count104
Issue Open Count44
Pull Requests Count31
Pull Requests Open Count1
Pull Requests Close Count17
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private