Skip to main content

Create a Conda environment file from a Python project using uv.

Project description

uv2conda

PyPI

Tiny Python package to create a conda environment file from a Python project using uv.

Assuming you have installed uv:

uvx uv2conda \
    --project-dir "/path/to/my/project/" \
    --name "my_conda_env_name" \
    --python "3.12.7" \
    --conda-env-file "my_conda_env.yaml" \
    --requirements-file "requirements.txt" \
    --uv-args "--prerelease=allow"

Or, in Python:

from uv2conda import CondaEnvironment

environment = CondaEnvironment.from_project_dir(
    project_dir="/path/to/my/project/",
    name="my_conda_env_name",
    python_version="3.12.7",
    uv_args=["--prerelease=allow"],
)
environment.to_pip_requirements_file("requirements.txt")
environment.to_yaml("environment.yaml")

Example for this library:

$ uv2conda --python 3.12.7
name: uv2conda
dependencies:
  - python=3.12.7
  - pip
  - pip:
      - click==8.1.7
      - colorama==0.4.6 ; sys_platform == 'win32' or platform_system == 'Windows'
      - loguru==0.7.2
      - markdown-it-py==3.0.0
      - mdurl==0.1.2
      - packaging==24.2
      - pygments==2.18.0
      - pyyaml==6.0.2
      - rich==13.9.4
      - shellingham==1.5.4
      - typer==0.15.1
      - typing-extensions==4.12.2
      - win32-setctime==1.1.0 ; sys_platform == 'win32'

Related projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uv2conda-1.0.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uv2conda-1.0.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file uv2conda-1.0.1.tar.gz.

File metadata

  • Download URL: uv2conda-1.0.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for uv2conda-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a47bdd3a36e2e25136d5204230176dedbe6ab6053d8b9b6997551b06126de9e5
MD5 81a390dd6ad0a4f3a1742c3fe97bffbe
BLAKE2b-256 11c1c9707c3d8473de0c30c32381f329fbb6859fd1f8b514b6feb8f51ad100be

See more details on using hashes here.

File details

Details for the file uv2conda-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: uv2conda-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for uv2conda-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cde3fa896c36e69d2489f1c4d1511fe78d8fc922b49f18b46d1ba6fd40dd67d9
MD5 bbb12021f4db681594db554d4a67b1fb
BLAKE2b-256 34107c641868bec668090a16417d9f0cb94ac6f81d9448be2de34dc0e348dc7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page