pip切换清华源

之前使用的阿里源,也是很慢。后来试了清华源,很快。

临时使用

pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple

全局设置

  1. 打开终端或命令行窗口,输入以下命令:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
  1. 输入以下命令:
pip config list

如果成功设置,您应该能够在输出结果中看到以下一行:

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

尝试在新的命令行窗口,再次运行上述命令。

pip切换清华源_第1张图片
image.png

现在,您的pip已经成功切换到清华源:

pip install opencv-python

你可能感兴趣的:(pip,python,开发语言)