Skip to content

Instantly share code, notes, and snippets.

@eagleon
Created February 20, 2014 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eagleon/9106302 to your computer and use it in GitHub Desktop.
Save eagleon/9106302 to your computer and use it in GitHub Desktop.
使用本地pip
#1. 安装pip2pi
sudo pip install pip2pi
#2. 创建存储目录
mkdir /var/www/packages/
#3. 简化命令。在编辑.zshrc 添加以下东东
alias piploc="pip install --index-url=file:///var/www/packages/simple"
alias piptoloc="pip2tgz /var/www/packages"
alias pipindex="dir2pi /var/www/packages"
#4. 缓存包到本地。每次缓存到本地后,需要使用pipindex建立索引
piptoloc flask
pipindex
#5. 使用本地pip源
piploc flask
piploc django==1.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment