Python安装模块常用镜像源


阿里云
    
    https://mirrors.aliyun.com/pypi/simple/

豆瓣(douban)
    
    https://pypi.douban.com/simple/

清华大学

    https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学

    https://pypi.mirrors.ustc.edu.cn/simple/

#Win 
python -m pip install xxx -i https://pypi.douban.com/simple

python -m pip install --upgrade SomePackage
python -m pip install SomePackage==1.0.4 # specific version 
python -m pip install "SomePackage>=1.0.4" # minimum version

#使用并行安装的多个 Python 版本
#
win
py -2 -m pip install SomePackage # default Python 2
py -2.7 -m pip install SomePackage # specifically Python 2.7
py -3 -m pip install SomePackage # default Python 3
py -3.4 -m pip install SomePackage # specifically Python 3.4

#在 Linux, Mac OS X 以及其他 POSIX 系统中
python2 -m pip install SomePackage # default Python 2
python2.7 -m pip install SomePackage # specifically Python 2.7
python3 -m pip install SomePackage # default Python 3
python3.4 -m pip install SomePackage # specifically Python 3.4

#将 --user 选项传入 python -m pip install 将只为当前用户而非为系统中的所有用户安装软件包

 

posted @ 2020-08-28 20:29  愿心远行  阅读(362)  评论(0)    收藏  举报