Skip to content

Command uv pip sync requirements.txt remove pip in venv create with uv venv --seed #7121

@arthurc0102

Description

@arthurc0102

Version info (on macOS)

❯ uv --version
uv 0.4.6 (84f25e8cf 2024-09-05)

Content of requirements.in

ruff

Create venv

❯ uv --verbose venv --seed
DEBUG uv 0.4.6
DEBUG Searching for Python interpreter in managed installations or system path
DEBUG Searching for managed installations at `/Users/user/.local/share/uv/python`
DEBUG Found managed installation `cpython-3.12.5-macos-aarch64-none`
DEBUG Found `cpython-3.12.5-macos-aarch64-none` at `/Users/user/.local/share/uv/python/cpython-3.12.5-macos-aarch64-none/bin/python3` (managed installations)
Using Python 3.12.5
Creating virtualenv with seed packages at: .venv
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.12.5
DEBUG Solving with target Python version: >=3.12.5
DEBUG Adding direct dependency: pip*
DEBUG Found fresh response for: https://pypi.org/simple/pip/
DEBUG Searching for a compatible version of pip (*)
DEBUG Selecting: pip==24.2 [compatible] (pip-24.2-py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/d4/55/90db48d85f7689ec6f81c0db0622d704306c5284850383c090e6c7195a5c/pip-24.2-py3-none-any.whl.metadata
DEBUG Tried 1 versions: pip 1
DEBUG Split specific environment resolution took 0.001s
DEBUG Installing in pip==24.2 in /Users/user/Desktop/ppp-project/.venv
DEBUG Requirement already cached: pip==24.2
DEBUG Installing build requirement: pip==24.2
 + pip==24.2
Activate with: source .venv/bin/activate

Generate requirements.txt

❯ uv --verbose pip compile requirements.in -o requirements.txt
DEBUG uv 0.4.6
DEBUG Starting Python discovery for any Python
DEBUG Looking for exact match for request any Python
DEBUG Searching for Python interpreter in managed installations or system path
DEBUG Found `cpython-3.12.5-macos-aarch64-none` at `/Users/user/Desktop/ppp-project/.venv/bin/python3` (active virtual environment)
DEBUG Using Python 3.12.5 interpreter at .venv/bin/python3 for builds
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.12.5
DEBUG Solving with target Python version: >=3.12.5
DEBUG Adding direct dependency: ruff*
DEBUG Found fresh response for: https://pypi.org/simple/ruff/
DEBUG Searching for a compatible version of ruff (*)
DEBUG Selecting: ruff==0.6.4 [preference] (ruff-0.6.4-py3-none-macosx_11_0_arm64.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/a6/fd/8784e3bbd79bc17de0a62de05fe5165f494ff7d77cb06630d6428c2f10d2/ruff-0.6.4-py3-none-macosx_11_0_arm64.whl.metadata
DEBUG Tried 1 versions: ruff 1
DEBUG Split specific environment resolution took 0.004s
Resolved 1 package in 4ms
# This file was autogenerated by uv via the following command:
#    uv pip compile requirements.in -o requirements.txt
ruff==0.6.4
    # via -r requirements.in

Run sync

❯ uv --verbose pip sync requirements.txt
DEBUG uv 0.4.6
DEBUG Searching for Python interpreter in system path
DEBUG Found `cpython-3.12.5-macos-aarch64-none` at `/Users/user/Desktop/ppp-project/.venv/bin/python3` (virtual environment)
DEBUG Using Python 3.12.5 environment at .venv/bin/python3
DEBUG Acquired lock for `.venv`
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.12.5
DEBUG Solving with target Python version: >=3.12.5
DEBUG Adding direct dependency: ruff==0.6.4
DEBUG Found fresh response for: https://pypi.org/simple/ruff/
DEBUG Searching for a compatible version of ruff (==0.6.4)
DEBUG Selecting: ruff==0.6.4 [compatible] (ruff-0.6.4-py3-none-macosx_11_0_arm64.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/a6/fd/8784e3bbd79bc17de0a62de05fe5165f494ff7d77cb06630d6428c2f10d2/ruff-0.6.4-py3-none-macosx_11_0_arm64.whl.metadata
DEBUG Tried 1 versions: ruff 1
DEBUG Split specific environment resolution took 0.004s
Resolved 1 package in 4ms
DEBUG Requirement already cached: ruff==0.6.4
DEBUG Unnecessary package: pip==24.2
DEBUG Uninstalled pip (442 files, 51 directories)
Uninstalled 1 package in 32ms
Installed 1 package in 2ms
 - pip==24.2
 + ruff==0.6.4
DEBUG Released lock at `/Users/user/Desktop/ppp-project/.venv/.lock`

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions