pip换源中科大

要将pip默认源更换为中科大源,可以使用以下命令:
pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple
执行后,所有pip安装命令都会默认使用中科大镜像源,下载速度会显著提升。你可以通过 pip config get global.index-url验证配置是否生效。
如果需要临时使用中科大源,可以在安装包时添加 -i参数:
pip install 包名 -i https://pypi.mirrors.ustc.edu.cn/simple
请登录后发表评论

    没有回复内容