Created
February 20, 2014 02:56
-
-
Save eagleon/9106302 to your computer and use it in GitHub Desktop.
使用本地pip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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