Python 타사 라이브러리의 느린 pip 설치 속도에 대한 솔루션

1 명령에 국내 미러 사이트를 지정합니다

  • 알리 클라우드:https://mirrors.aliyun.com/pypi/simple/
  • 중국 과학기술대학교:https://pypi.mirrors.ustc.edu.cn/simple/
  • 화웨이 클라우드:https://mirrors.huaweicloud.com/repository/pypi/simple/
pip install -i https://mirrors.aliyun.com/pypi/simple/ [package_name]

2 영구 구성 소스

2.1 리눅스 시스템 구성

Linux해당 시스템 에서 ~/.pip/pip.conf글로벌 구성을 생성하도록 수정하고, 파일이 없으면 생성하면 됩니다. 파일
에 다음 내용을 입력하고 저장합니다.pip.conf

[global]
index-url = https://mirrors.aliyun.com/pypi/simple

[install]
trusted-host = mirrors.aliyun.com

2.2 윈도우 시스템

사용자 디렉터리에 C:\Users\用户名\pip\pip.ini새 디렉터리를 생성 pip하고 pip.ini동시에 파일을 생성합니다.

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[install]
trusted-host=mirrors.aliyun.com

추천

출처blog.csdn.net/weixin_43684214/article/details/132873356