Skip to content

uv export --script being able to export the requirements of a script to a requirements.txt #9657

@samster25

Description

@samster25

It would be very useful to be able to export the requirements from a script to a requirements.txt file.

This is especially the case when you need to work with a tool that doesn't support uv and expects a requirements.txt to set up the environment like with ray.

# set up script
uv init --script example.py --python 3.12
# add numpy
uv add --script example.py 'numpy'

# this is what would be nice
uv export --script example.py > requirements.txt

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already exists

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions