pip 若是提示要升級,如何使用清華源加速?(附:一鍵設置清華源爲默認的方法)

在命令行中輸入 pip install pip -U 能夠將pip升級到最新
輸入如下命令能夠將清華源加速設置爲默認,之後就不用輸入臨時的網址了:pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple網絡

若是網絡鏈接較差,升級時報錯,能夠臨時使用該鏡像站來升級 pip:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -Uurl

相關文章
相關標籤/搜索