美文网首页
pip切换清华源

pip切换清华源

作者: ag4kd | 来源:发表于2023-07-23 17:49 被阅读0次

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

临时使用

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

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


image.png

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

pip install opencv-python

相关文章

网友评论

      本文标题:pip切换清华源

      本文链接:https://www.haomeiwen.com/subject/wezfpdtx.html