Skip to content

Commit

Permalink
Update instruction on pip mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
t41372 committed Jan 25, 2025
1 parent e5d72df commit 317c653
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 17 deletions.
28 changes: 20 additions & 8 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,26 @@ git submodule update --init --recursive
### 2. 安装项目依赖

:::info
内地用户可以配置 Python 与 pip 的镜像源,提高下载速度。

请在项目目录下的 `pyproject.toml` 文件底部添加下面内容
```toml
[[tool.uv.index]]
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
default = true
```
> :warning: 如果你不在中国大陆境内,没有必要使用镜像源。
内地用户可以配置 Python 与 pip 的镜像源,提高下载速度。此处我们配置阿里镜像。

<details>
请在项目目录下的 `pyproject.toml` 文件底部添加下面内容。
```toml
[[tool.uv.index]]
url = "https://mirrors.aliyun.com/pypi/simple"
default = true
```
一些其他镜像源 (修改上面的 url 部分)
- 腾讯镜像: https://mirrors.cloud.tencent.com/pypi/simple/
- 中科大镜像: https://pypi.mirrors.ustc.edu.cn/simple
- 清华镜像(安装我们项目好像有点问题): https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
- 华为镜像: https://repo.huaweicloud.com/repository/pypi/simple
- 百度镜像: https://mirror.baidu.com/pypi/simple

有些镜像源有时候可能会不稳定,如果出现问题,可以换一个镜像源试试。
</details>
:::

确认 uv 已正确安装:
Expand Down
29 changes: 20 additions & 9 deletions i18n/en/docusaurus-plugin-content-docs/current/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,26 @@ git submodule update --init --recursive
### 2. Install Project Dependencies

:::info
Users in mainland China can configure Python and pip mirror sources to improve download speed.

Please add the following content to the bottom of the `pyproject.toml` file in the project directory:
```toml
[[tool.uv.index]]
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
default = true
```
:::
> :warning: If you are not located in mainland China, don't use mirror sources.
Users in mainland China can configure mirrors for Python and pip to improve download speeds. Here, we'll set up the Alibaba mirror.

<details>
Please add the following content to the bottom of the `pyproject.toml` file in your project directory.
```toml
[[tool.uv.index]]
url = "https://mirrors.aliyun.com/pypi/simple"
default = true
```
Some other mirror sources (modify the url part above):
- Tencent mirror: https://mirrors.cloud.tencent.com/pypi/simple/
- USTC mirror: https://pypi.mirrors.ustc.edu.cn/simple
- Tsinghua mirror (seems to have some issues with our project): https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
- Huawei mirror: https://repo.huaweicloud.com/repository/pypi/simple
- Baidu mirror: https://mirror.baidu.com/pypi/simple

Some mirrors may be unstable at times. If you encounter issues, try switching to a different mirror.
</details>

Verify that uv is installed correctly:

Expand Down

0 comments on commit 317c653

Please sign in to comment.