ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

pip 清华镜像源

pip 清华镜像源 pypi 镜像使用帮助 Pypi | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirrorpypi 镜像每 5 分钟同步一次。临时使用pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package注意simple不能少, 是https而不是http设为默认升级 pip 到最新的版本 (10.0.0) 后进行配置# 版本低的话先升级 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U # 设置全局默认索引源为清华源 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # 设置信任该源避免SSL警告 pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn如果您到 pip 默认源的网络连接较差临时使用本镜像站来升级 pippip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U国内源https://pypi.tuna.tsinghua.edu.cn/simple http://mirrors.aliyun.com/pypi/simple/ https://pypi.mirrors.ustc.edu.cn/simple/ http://pypi.hustunique.com/ http://pypi.sdutlinux.org/ http://pypi.douban.com/simple/-------asy_install~/.pydistutils.cfg --linux%HOMEPATH%\pydistutils.cfg --window[easy_install] index_url http://ip:port/simple 临时配置 easy_install -i http://ip:port/simple fabric pip -i http://ip:port/simple fabric其他镜像pip国内的一些镜像阿里云 Simple Index中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/豆瓣(douban) http://pypi.douban.com/simple/清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/提示若担心安全问题请使用HTTPS加密源修改源方法临时使用Linux Mac Windows 通用命令可以在使用pip的时候在后面加上-i参数指定pip源pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple永久修改Linux:修改 pip.conf 文件 (没有就创建一个)$HOME/.config/pip/pip.conf修改内容如下[global]index-url https://pypi.tuna.tsinghua.edu.cn/simple12Mac:修改 pip.conf 文件$HOME/Library/Application Support/pip/pip.conf如果没有上面的目录,在如下目录创建 pip.conf$HOME/.config/pip/pip.conf修改内容如下[global]index-url https://pypi.tuna.tsinghua.edu.cn/simple12Windows:修改 pip.conf 文件 (没有就创建一个)%APPDATA%\pip\pip.ini修改内容如下[global]index-url https://pypi.tuna.tsinghua.edu.cn/simple修改文件后执行命令发生错误使用非HTTPS加密源如豆瓣源在执行命令发生错误在命令最后加上--trusted-host pypi.douban.compip install django -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
返回列表