skillfed

pyproject2conda

A script to convert a Python project declared on a pyproject.toml to a conda environment.

pyproject2conda v0.23.1 124.6K downloads/30d#11,861 on PyPI17
License unclear NIST-PD Active released

What it is and what it does

pyproject2conda is a command-line tool that reads dependency declarations from a Python project's pyproject.toml file and generates conda environment.yaml and requirements.txt files. It solves the problem of maintaining dependency information in two places when working with mixed pip and conda workflows—you declare everything once in pyproject.toml, and the tool generates the conda-compatible output automatically.

The package supports remapping PyPI package names to their conda equivalents (useful when a package has different names in the two ecosystems), filtering dependencies by Python version using standard markers, and optionally including Python version constraints in the output. It integrates with pre-commit hooks to keep generated files in sync with pyproject.toml changes. Dependencies are runtime-minimal: packaging, pydantic, tomli, typer, and typing-extensions.

Use it for:

  • Keep a single source of truth for dependencies across pip and conda-based development environments.
  • Automatically generate environment.yaml files for conda users from a pyproject.toml-based project.
  • Remap PyPI package names to conda equivalents where they differ across ecosystems.
  • Filter dependencies by Python version and generate version-specific environment files.
  • Use pre-commit hooks to ensure environment files stay synchronized with pyproject.toml changes.
  • Generate requirements.txt from pyproject.toml for pip-only workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts Python project dependencies from pyproject.toml into conda environment.yaml and requirements.txt files, with support for remapping PyPI package names to conda equivalents.

Yes, if you maintain a Python project and need to support both pip and conda users. The tool solves a real workflow problem (single-source dependency management), has low install friction, active maintenance, no known vulnerabilities, and public-domain licensing. The Pre-Alpha status reflects ongoing development but does not indicate instability—the author actively uses it. Install it if you're already using pyproject.toml and want to avoid manually maintaining separate conda environment files.

Install

pyproject2conda on PyPI

pip

pip install pyproject2conda

uv

uv add pyproject2conda

poetry

poetry add pyproject2conda

Installing pyproject2conda

Before you install

Low install friction with a pure Python wheel and five lightweight runtime dependencies. Actively maintained with a recent release; marked Pre-Alpha but in active use by the author.

License in practice

Licensed under NIST-PD (public domain), which places no restrictions on use, modification, or distribution.

Quickstart

pip install pyproject2conda

pyproject2conda yaml --pyproject pyproject.toml

# Output: environment.yaml with conda dependencies extracted from pyproject.toml

Requires Python >=3.10; pyproject.toml must contain project.dependencies or project.optional-dependencies sections.

Verify before relying

  • Whether the package handles all environment markers correctly in practice.
  • Performance characteristics when processing large or complex dependency graphs.
  • Compatibility with non-standard pyproject.toml layouts or edge cases in dependency specifications.

Package facts

License NIST-PD (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — packaging, pydantic, tomli, typer, typing-extensions
Maintenance actively maintained — 99 days since the last release
Last repo commit
First released
Downloads 124,601/month — #11,861 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyproject2conda-0.23.1-py3-none-any.whl

Keywords: pyproject2conda

Development Status :: 2 - Pre-AlphaIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering

Tags

pyproject.toml to conda environmentconvert dependencies conda yamlpip to conda environment generatorpyproject conda environment filedependency management pyproject condaenvironment.yaml from pyprojectconda environment automation
dependency-managementconda-integrationbuild-automation

More Scientific/Engineering packages