一、参考链接
阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)
pypi镜像-pypi下载地址-pypi装置教程-阿里巴巴开源镜像站 (aliyun.com)
https://pypi.org/
二、PyPI 镜像简介
PyPI (Python Package Index) 是 Python 编程语言的软件存储库。开发者能够通过 PyPI 查找和装置由 Python 社区开发和共享的软件,也能够将本人开发的库上传至 PyPI 。
下载地址:https://mirrors.aliyun.com/pypi/
三、PyPI 镜像配置办法
默认状况下 pip 应用的是国外的镜像,在下载的时候速度十分慢,本文咱们介绍应用阿里云的镜像源源,地址为:https://mirrors.aliyun.com/pypi/
Windows零碎下应用
1️ 关上运行框,输出:==%APPDATA%==
2️ 按回车跳转进入此目录,并新建一个名为pip文件夹
3️ 在pip文件夹内创立pip.ini文件
4️在pip.ini文件夹内填写以下配置信息
[global]index-url = https://mirrors.aliyun.com/pypi/simple/[install]trusted-host=mirrors.aliyun.com
5️ 测试应用
C:\Users\xybdiy>pip install some-packageDefaulting to user installation because normal site-packages is not writeableLooking in indexes: https://mirrors.aliyun.com/pypi/simple/Collecting some-package Downloading https://mirrors.aliyun.com/pypi/packages/e7/a2/d318a685319c3801db1ae0002fc8e095663a55546c62a6e30d9d0fc3289b/some-package-0.1.zip (2.8 kB) Preparing metadata (setup.py) ... doneUsing legacy 'setup.py install' for some-package, since package 'wheel' is not installed.Installing collected packages: some-package Running setup.py install for some-package ... doneSuccessfully installed some-package-0.1C:\Users\xybdiy>pip listPackage Version--------------- -------cffi 1.15.0cycler 0.11.0fonttools 4.28.3kiwisolver 1.3.2numpy 1.21.4packaging 21.3Pillow 8.4.0pip 21.3.1pycparser 2.21pyparsing 3.0.6python-dateutil 2.8.2scapy 2.4.5setuptools 57.4.0setuptools-scm 6.3.2six 1.16.0some-package 0.1tomli 1.2.2C:\Users\xybdiy>