Python 切换pip源使用

场景:在使用pip下载安装第三包,使用默认https://pypi.org/很慢,需要切换到国内源镜像下载会快些。

常用的国内源镜像:

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
豆瓣:http://pypi.douban.com/simple/

使用方式:pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple



Mac 默认python2.7,默认切换成python3

下载python3,找到python3的路径

vim ~/.bash_profile

alias python3='/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7'

 source ~/.bash_profile

就OK了


posted @ 2021-03-11 21:11  TestingShare  阅读(101)  评论(0编辑  收藏  举报