mac设置python pip 镜像源为清华源

加速pip下载包的速度

命令

‘’’
logendeMacBook-Air:mytest logen$ mkdir ~/.pip
logendeMacBook-Air:mytest logen$ tee ~/.pip/pip.conf <<-‘EOF’
> [global]
> index-url=http://mirrors.aliyun.com/pypi/simple/
> [install]
> trusted-host=mirrors.aliyun.com
> EOF

测试一下速度

logendeMacBook-Air:mytest logen$ pip install tensorflow2.0
Collecting tensorflow
2.0
Downloading http://mirrors.aliyun.com/pypi/packages/c8/a1/2ab46a175c916b0149ccb9edc06202bce6365455779fa251c1f59a4c7806/tensorflow-2.0.0-cp36-cp36m-macosx_10_11_x86_64.whl (102.7MB)
100% |████████████████████████████████| 102.7MB 7.7MB/s

你可能感兴趣的:(python+NLP,python,pip)