目录
首发于:
最近更新于:
分类: posts

前言

因为GFW的问题,下载某些资源速度会很慢,这时候需要配置国内源来下载,本文罗列了一些相关信息。

Github内容下载

利用 来查询 raw.githubusercontent.com 的最新ip,然后修改你的电脑的hosts文件配置。

pypi下载使用国内源

豆瓣的pypi源 https://pypi.douban.com/simple 或者 清华的pypi源 https://pypi.tuna.tsinghua.edu.cn/simple 都可以吧。

临时使用用 -i 或者 --index 选项:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

永久更改本地配置:

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

js 用国内cdn源

推荐 bootcdn 这个网站。

npm国内源

淘宝源域名已更改,已更新。

npm config set registry https://registry.npmmirror.com