服务器端

操作系统: ubuntu 12.04

运行以下命令

sudo pip install pip2pi
mkdir /home/pypi
cd /home/pypi
mkdir packages
vi requirement.txt # 添加你需要更新的包
pip2tgz packages/ -r requirements.txt
dir2pi packages/

修改 nginx conf

server {
    listen       80;
    server_name  pypi.folowing.com;

    location / {
        root   /home/pypi/packages;
    }
}

客户端

编辑: .pip/pip.conf

[global]
index-url = http://pypi.folowing.com/simple