pip安裝:sudo apt-get install python3-pip
pip更新:sudo pip3 install --upgrade pip
pip卸載:sudo apt-get remove python3-pip
pip臨時換源:
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django
1.備份原有的yum源,以防出錯時還可以還原。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.進入yum.repos.d目錄。
cd /etc/yum.repos.d
3.下載相應的源。(我用的是163yum源)
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo #centos7系統的 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo #centos6系統的 wget http://mirrors.163.com/.help/CentOS5-Base-163.repo #centos5系統的
(注:如果下載出現錯誤,可能是變更了下載的地址,可以到:http://mirrors.163.com/.help/centos.html 找新的下載地址。沒有安裝wget的,要先安裝。)
4.更名。
mv CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
5.產生新的緩存。
yum clean all yum makecache
至此源更新完成,可以 yum -y update 測試一下更新的速度。