Skip to main content

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

Project description

uv2conda

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

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

Or, in Python:

import uv2conda

uv2conda.make_conda_env_from_project_dir(
    "/path/to/my/project/",
    name="my_conda_env_name",
    python_version="3.12.7",
    out_path="environment.yaml",
    uv_args=["--prerelease=allow"],
)

Example for this library:

$ uv2conda --python 3.12.7 --show
INFO | Environment name not provided. Using project directory name ("uv2conda")
SUCCESS | Conda environment file created at "environment.yaml"
INFO | Printing contents of the generated conda environment file
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.13.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-0.1.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

uv2conda-0.1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uv2conda-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7a7102d08a6bc997ff7906b628d781ed458cf67967608b3415f39813932e06cc
MD5 33bdcf0b26731f835d3af70ed30b54f8
BLAKE2b-256 14d551ad6ddfdd2cbc0a02e15dc0afc3c8d0fc00669d8d9d9fde11511a461594

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv2conda-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 12bd1ab87dff395b6efccc4b2584f38cf6f577e417bdffdcd2db44322ee06ea1
MD5 56cead83592a02a846b201b2edfd4e35
BLAKE2b-256 309eb33546a8927cb8464f1d06ac7e7674b357e7f20c4ec9a0d6557f71c252fc

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