Skip to content

Question: uv pip compile pyproject.toml -o requirements.txt generate empty requirements.txt #1597

@XiaoConstantine

Description

@XiaoConstantine

Context:

Trying to convert a simple poetry project with uv.

❯ uname -a
Darwin Xiaos-MBP.fios-router.home 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64
❯ uv -V
uv 0.1.3

My pyproject.toml file:

[tool.poetry.dependencies]
python = "^3.9"
torch = "^1.13.1"
huggingface = "^0.0.1"
transformers = {extras = ["torch"], version = "^4.37.1"}

Running following commands:

  1. Create venv:
uv venv
  1. Activate venv:
source ./venv/bin/activate
  1. Compile the requriements txt from pyproject toml
 uv::requirements::from_source source=pyproject.toml
 uv::requirements::from_source source=requirements.txt
warning: Requirements file requirements.txt does not contain any dependencies
    0.007549s DEBUG uv_interpreter::virtual_env Found a virtualenv through VIRTUAL_ENV at: /Users/xiao/development/github.com/XiaoConstantine/butler/.venv
    0.008561s DEBUG uv_interpreter::interpreter Using cached markers for: /Users/xiao/development/github.com/XiaoConstantine/butler/.venv/bin/python
    0.008567s DEBUG uv::commands::pip_compile Using Python 3.9.16 interpreter at /Users/xiao/development/github.com/XiaoConstantine/butler/.venv/bin/python for builds
 uv_client::flat_index::from_entries
 uv_resolver::resolver::solve
      0.163449s   0ms DEBUG uv_resolver::resolver Solving with target Python version 3.9.16
   uv_resolver::resolver::choose_version package=root
   uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
Resolved 0 packages in 164ms

Also tried with uv -n (no-cache) but seems the same result

Is this due to the dependency or I missed something? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityCompatibility with a specification or another toolquestionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions