当前位置: 首页 > 后端技术 > Python

Python使用命令行pipinstall安装库,网速慢,解决方法

时间:2023-03-26 13:12:08 Python

安装第三方库:最近安装了jieba库,发现安装速度非常非常慢。这是因为pip默认源在国外,pipinstallsome_packages很慢,经常超时,导致安装失败;所以把pip换成国内的镜像,可以快速下载安装。暂时使用国内镜像:pipinstallsome_package--indexhttps://pypi.mirrors.ustc.edu.cn/simple/完成快速下载。几个常用的国内镜像合集:阿里云http://mirrors.aliyun.com/pypi/simple/中国科学技术大学https://pypi.mirrors.ustc.edu.cn/simple/豆瓣http://http://pypi.mirrors.ustc.edu.cn/simple//pypi.douban.com/simple/清华大学https://pypi.tuna.tsinghua.edu.cn/simple/中国科学技术大学http://pypi.mirrors.ustc.edu.cn/simple/