pip
清华镜像:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣镜像:https://pypi.douban.com/simple/ 或 http://pypi.douban.com/simple/
临时使用时:pip install -i https://pypi.douban.com/simple/ <others>
注意!
当使用http时,需要加上- -trusted-host pypi.douban.com才可以~
docker
在/etc/docker/daemon.json文件内写入以下内容,如果没有则新建:12345{ "registry-mirrors": [ "https://registry.docker-cn.com" ]}
重新启动:12$ sudo systemctl daemon-reload$ sudo systemctl restart docker
使用docker info可以看到镜像的配置情况。
source: yeasy.gitbooks.io(https://yeasy.gitbooks.io/docker_practice/install/mirror.html)