用pip安装模块时,总是会报错,大片红字,请求超时,影响心情
如果使用镜像安装,就会很顺,敲一下回车键,一两秒就搞定,节约时间
平常简单用法是:pip install beautifulsoup4
加入镜像参数后:pip install -i http://pypi.douban.com/simple beautifulsoup4
镜像使用方式:pip install -i 镜像链接 模块例如:
使用清华镜像安装scrapy模块
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scrapy
镜像链接可以是:
清华镜像:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣镜像:http://pypi.douban.com/simple
阿里云镜像:http://mirrors.aliyun.com/pypi/simple