anaconda配置鏡像
Mac and Linux
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes
Windows
windows下,直接在user目錄中創建一個pip目錄,如:C:\Users\xx\pip,新建文件pip.ini,內容如下
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
pip配置鏡像
Linux
修改 ~/.pip/pip.conf (沒有就創建一個), 修改 index-url至tuna,內容如下:
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
Windows
直接在user目錄中創建一個pip目錄,如:C:\Users\xx\pip,新建文件pip.ini,內容如下
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
pip臨時鏡像
臨時使用:
可以在使用pip的時候加參數-i https://pypi.tuna.tsinghua.edu.cn/simple
例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent,這樣就會從清華這邊的鏡像去安裝gevent庫。