國內鏡像加速仍是很給力的。收集一些經常使用的鏡像。python
https://pypi.tuna.tsinghua.edu.cn/simplegit
臨時使用github
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
docker
設置默認json
修改 ~/.config/pip/pip.conf
(Linux), %APPDATA%\pip\pip.ini
(Windows 10) 或$HOME/Library/Application Support/pip/pip.conf
(macOS) (沒有就建立一個), 修改index-url
至tuna,例如ubuntu
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
https://mirrors.aliyun.com/help/pypi測試
在~/.pip/pip.conf
文件中添加或修改url
[global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/spa
Anaconda 是一個用於科學計算的 Python 發行版,支持 Linux, Mac, Windows, 包含了衆多流行的科學計算、數據分析的 Python 包。code
Anaconda 安裝包能夠到
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
下載。
TUNA 還提供了 Anaconda 倉庫的鏡像,運行如下命令:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes
便可添加 Anaconda Python 免費倉庫。
運行
conda install numpy
測試一下吧。
Miniconda 是一個 Anaconda 的輕量級替代,默認只包含了 python 和 conda,可是能夠經過 pip 和 conda 來安裝所須要的包。
Miniconda 安裝包能夠到
https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/
下載。
當前tuna還維護了一些anaconda三方源。
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
對於conda的其餘三方源,若有須要請在這個issue中提出請求,咱們會綜合考慮多方因素來酌情增減。
ubuntu16.04+ ,在/etc/docker/daemon.json
寫入以下內容
{ "registry-mirrors": [ "https://registry.docker-cn.com" ] }