Skip to main content

Fast UV installer with China mirrors pre-configured - 预配置国内源的快速 uv 安装器

Project description

fastuv: 快速 uv 安装器

PyPI version License

fastuv 是一个通过 PyPI 分发的 uv 安装器,专为国内用户优化。它自动配置国内镜像源,实现用户级别的快速安装。

✨ 特性

  • [开始] 一键安装pip install fastuv && fastuv install
  • 🇨🇳 国内优化:自动配置清华源等国内镜像,大幅提升下载速度
  • 👤 用户级别:无需 sudo 权限,安装到用户目录
  • 🔄 自动配置:自动设置 PATH 和 conda 环境联动
  • [清理] 完整卸载:支持 fastuv uninstall 完全清理

[开始] 快速开始

安装 fastuv

pip install fastuv

安装 uv

fastuv install

安装完成后,uv 将自动配置国内镜像源,你可以直接使用:

# 重启终端或 source 配置文件
source ~/.bashrc  # 或 source ~/.zshrc

# 现在可以使用 uv 了
uv --version
uv pip install requests

[配置] 高级用法

自定义安装选项

# 指定版本
fastuv install --version 0.5.0

# 指定下载代理
fastuv install --proxy https://ghproxy.com

# 指定 PyPI 镜像源
fastuv install --mirror https://mirrors.aliyun.com/pypi/simple/

# 不安装 conda 环境联动
fastuv install --no-hooks

完全卸载

# 只卸载 uv
fastuv uninstall

# 卸载并清理所有配置和缓存
fastuv uninstall --all

[安装包] 安装过程中做了什么

fastuv install 会自动完成以下步骤:

  1. 下载官方 uv 安装脚本
  2. 注入国内镜像配置
    • PyPI 镜像:https://pypi.tuna.tsinghua.edu.cn/simple/
    • Python 下载代理:https://ghfast.top
  3. 执行用户级别安装(安装到 ~/.local/bin/
  4. 配置环境变量
    • 添加 ~/.local/bin 到 PATH
  5. 创建配置文件~/.config/uv/uv.toml
  6. 可选:安装 conda 环境联动 hooks

[检查] 配置文件

fastuv 会自动创建 ~/.config/uv/uv.toml

python-install-mirror = "https://ghfast.top/https://github.com/astral-sh/python-build-standalone/releases/download"

[[index]]
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
default = true

[协作] Conda 环境联动

如果你是 conda/mamba 用户,fastuv 会自动配置环境联动,让 uv 能够识别和使用当前激活的 conda 环境。

[安全] 安全说明

  • fastuv 下载的是 uv 官方安装脚本,只注入镜像配置
  • 所有修改都在用户目录下进行,不会影响系统
  • 完整开源,代码透明

🆚 与其他方案对比

方案 安装方式 镜像配置 用户级别 conda 联动
fastuv pip install + fastuv install [完成] 自动 [完成] 是 [完成] 自动
官方 uv `curl sh` [错误] 手动 [错误] 需要 sudo
uv-custom `curl sh` [完成] 自动 [完成] 是

🐛 故障排除

安装失败

# 检查网络连接
fastuv install --proxy https://ghproxy.com

# 使用不同镜像
fastuv install --mirror https://mirrors.aliyun.com/pypi/simple/

uv 命令未找到

# 手动添加 PATH(临时)
export PATH="$HOME/.local/bin:$PATH"

# 或重启终端让配置生效
source ~/.bashrc

查看配置

# 检查 uv 配置
cat ~/.config/uv/uv.toml

# 检查 uv 版本
uv --version

[协作] 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT License - 详见 LICENSE 文件

🙏 致谢

  • uv - 极速的 Python 包管理器
  • uv-custom - 提供了优秀的镜像配置模板

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastuv-0.1.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastuv-0.1.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file fastuv-0.1.1.tar.gz.

File metadata

  • Download URL: fastuv-0.1.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for fastuv-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d015133b78400acd55b4b2a81566c5b325c6b8ecd0a4c809ba1cd8c3c314ea85
MD5 fae6beff1c791cc79a5bf066c0252b42
BLAKE2b-256 693b9371d2609a39e6c1bd8baaa7d38ee988f74d9bdeb1af4f54897aabb956dc

See more details on using hashes here.

File details

Details for the file fastuv-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastuv-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for fastuv-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 baa85166d274abbde38e1378c945919426d2a9f84e8af5f138cb4a50fcf72404
MD5 902bfb9c527a74b660d778d47f6564c6
BLAKE2b-256 ef1063a4d84f2156a877cfdf4a2f0833f34ff63409f4159382e6e16fad525941

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page