1.應該用一種方式安裝不要一下用pip 一下用brew
2.Mac OS 目前”於El Capitan引入了SIP機制(System Integrity Protection),默認下系統啟用SIP系統完整性保護機制,會限制對系統目錄的寫入操作。造成使用sudo 安裝仍會出現權限不足的錯誤
要採用user space的方式安裝在自己架構下
- Ubuntu 16.04
 
sudo apt-get install powerline
修改/etc/bash.bashrc 與自家的~/.bashrc
POWERLINE_SCRIPT=/usr/share/powerline/bindings/bash/powerline.sh if [ -f $POWERLINE_SCRIPT ]; then source $POWERLINE_SCRIPT fi
- Mac OS
 
使用brew 安裝
mkdir -p ~/.config/powerline/themes/shell
cp default.jason ~/.config/powerline/themes/shell
edit
{
        "segments": {
                "left": [
                        {
                                "function": "powerline.segments.shell.mode"
                        },
                        {
                                "function": "powerline.segments.common.net.hostname",
                                "priority": 10
                        },
                        {
                                "function": "powerline.segments.common.env.user",
                                "before": "𝓢 ",
                                "priority": 30
                        },
                        {
                                "function": "powerline.segments.common.env.virtualenv",
                                "priority": 50
                        },
                        {
                                "function": "powerline.segments.common.time.date",
                                "args": {
                                        "format": "%H:%M"
                                  },
                                "priority": 10
                        },
                        {
                                "function": "powerline.segments.shell.cwd",
                                "priority": 10
                        },
                        {
                                "function": "powerline.segments.shell.jobnum",
                                "priority": 20
                        }
                ],
                "right": [
                        {
                                "function": "powerline.segments.shell.last_pipe_status",
                                "priority": 10
                        },
                        {
                                "function": "powerline.segments.common.vcs.stash",
                                "priority": 50
                        },
                        {
                                "function": "powerline.segments.common.vcs.branch",
                                "priority": 40
                        }
                ]
        }
}