Python 环境配置: 安装 pip: A tool for installing and managing Python packages.
To install or upgrade pip, securely download get-pip.py. Then run the following (which may require administrator access):
$ sudo python get-pip.py
#Upgrade pip
$ pip install -U pip
注:也可以 brew install python
来安装 pip
Install virtualenv
$ sudo pip install virtualenv
$ sudo pip install virtualenvwrapper
$ subl ~/.zshrc
添加:source /usr/local/bin/virtualenvwrapper.sh
创建新的虚拟环境:$ mkvirtualenv venv
,环境存放的目录是~/.virtualenv/venv
;
$ workon #列出当前环境
$ workon venv
#切换环境
$ deactivate #退出环境
Ref: Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion
Ubuntu 14.04 环境配置
0.采用国内的软件源:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
1.安装软件
2.下载安装 deb 软件:
3.tsocks: 让 apt-get 走 socks 代理的流量
/etc/tsocks.conf
里面的server
和server_port