pip常用记录

时间:2023-03-09 19:10:03
pip常用记录

同电脑多版本python

python2 -m pip install 包名(python2指向2.7的python.exe)

指定版本

pip install 包名==版本号

指定源

pip install receive http://mirrors.aliyun.com/pypi/simple/

某些包可能因为被墙,或者某个源没有,可以尝试指定其他源安装

pip常用源

  1. 阿里云 http://mirrors.aliyun.com/pypi/simple/
  2. 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
  3. 豆瓣 (douban) http://pypi.douban.com/simple/
  4. 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
  5. 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
C:\Users\user\Desktop\web_py>python2 -m pip install receive http://mirrors.aliyun.com/pypi/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting http://mirrors.aliyun.com/pypi/simple/
Downloading http://mirrors.aliyun.com/pypi/simple/ (7.6MB)
100% |████████████████████████████████| 7.6MB 55kB/s
Cannot unpack file c:\users\user\appdata\local\temp\pip-unpack-zc4dwk\simple.html (downloaded from c:\users\user\appdata\local\temp\pip-req-build-v59wki, content-type: text/html); cannot detect archive format
Cannot determine archive format of c:\users\user\appdata\local\temp\pip-req-build-v59wki C:\Users\user\Desktop\web_py>python2 -m pip install receive https://pypi.mirrors.ustc.edu.cn/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting https://pypi.mirrors.ustc.edu.cn/simple/
Downloading https://pypi.mirrors.ustc.edu.cn/simple/ (7.7MB)
100% |████████████████████████████████| 7.7MB 547kB/s
Cannot unpack file c:\users\user\appdata\local\temp\pip-unpack-qm3x7w\simple (downloaded from c:\users\user\appdata\local\temp\pip-req-build-tvbhov, content-type: text/html; charset=UTF-8); cannot detect archive format
Cannot determine archive format of c:\users\user\appdata\local\temp\pip-req-build-tvbhov