uv
2025年12月9日小于 1 分钟
使用https
.venv/bin/uvicorn main:app \
--host 0.0.0.0 \
--port 50000 \
--ssl-keyfile=/etc/letsencrypt/live/catpd.cn/privkey.pem \
--ssl-certfile=/etc/letsencrypt/live/catpd.cn/fullchain.pem设置镜像
pyproject.toml 添加
[[tool.uv.index]]
name = "qh"
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"指定镜像
uv add moviepy --default-index https://mirrors.aliyun.com/pypi/simple/
uv venv .venv
.venv\Scripts\activate
uv pip install ipykernel
python -m ipykernel install --user --name=uv-env --display-name "Python (uv)"
| Command | What it does |
|---|---|
uv add ipykernel | Adds the package to the environment AND updates uv.toml (project dependency file) |
uv pip install ipykernel | Installs the package only into the environment (no record in uv.toml) |
| uv sync | 重装 |
| uv venv .venv | 创建虚拟环境 |
| uv init | 初始化 |
jupyter kernelspec list