学习python的第一步不是语法,而是把pip切换成国内源
在学习Python时,总会遇到需要安装Python第三方模块的情况。但是,按照教程输入pip install xxx 等了很久却满屏红字,折腾很久,你可能就从入门到放弃了。
由于国内网络的原因,直接使用pip默认源可能会很慢,这里提供一些国内的pip源。使用方法:在下面命令中任选一条,在cmd中执行即可。
清华大学pip镜像源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
阿里云pip镜像
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
腾讯云pip镜像
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
豆瓣pip镜像
pip config set global.index-url http://pypi.douban.com/simple/
网易pip镜像
pip config set global.index-url https://mirrors.163.com/pypi/simple/