uv install package with pip

How to

1. export

uv export --frozen --no-hashes -o dev_requirements.txt

--frozen表示只输出txt,不更新uv.lock文件

2. create venv and install pip

uv venv --python 3.11 --prompt xxx-3.11
source .venv/*/activate # Linux/Mac/GitBash
.venv\Scripts\activate # Windows
python -m ensurepip
python -m pip install --upgrade pip

3. make deps

python -m pip install -r dev_requirements.txt
posted @ 2024-10-29 10:05  waketzheng  阅读(23)  评论(0编辑  收藏  举报