-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython.sh
More file actions
33 lines (27 loc) · 751 Bytes
/
Copy pathpython.sh
File metadata and controls
33 lines (27 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
printf "Installing pip..."
sudo apt-get -y install python-pip python-dev
sudo pip install -i https://pypi.douban.com/simple --upgrade pip
# pip setting
PIP_CONFIG_DIR="/home/vagrant/.config/pip"
mkdir -p $PIP_CONFIG_DIR
rm --force $PIP_CONFIG_DIR/pip.conf
tee -a $PIP_CONFIG_DIR/pip.conf <<EOF
[global]
# 使用豆瓣源加速
index-url = https://pypi.douban.com/simple
trusted-host = pypi.douban.com
EOF
# 同步pip配置
sudo mkdir -p /root/.config/pip
sudo rm --force /root/.config/pip/pip.conf
sudo cp $PIP_CONFIG_DIR/pip.conf /root/.config/pip/pip.conf
# 安装模块
# virtualenv
# shadowsocks
# mycli
# icdiff
# httpie
# wheel
sudo pip install virtualenv shadowsocks mycli icdiff httpie wheel
# TODO setup pip auto completion