pyproject2conda
A script to convert a Python project declared on a pyproject.toml to a conda environment.
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 pyproject2condauv
uv add pyproject2condapoetry
poetry add pyproject2condaInstalling 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
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
unidepUniDep unifies Conda and Pip dependency…
unclear · top 15,000 on PyPI
uv-sortAlphabetically sorts dependencies in uv's…
permissive · top 15,000 on PyPI
sphinx-pyprojectLoads Sphinx documentation configuration from…
permissive · top 15,000 on PyPI
pyproject-dependenciesExtracts and prints the direct dependencies…
permissive · top 15,000 on PyPI
pyproject-hooksCalls build-backend hooks defined in…
permissive · top 1,000 on PyPI
pyproject-parserParses and extracts metadata from…
permissive · top 15,000 on PyPI
single-sourceExtracts your package version from…
permissive · top 15,000 on PyPI
pyproject-tomlParses and validates Python project metadata…
permissive · top 15,000 on PyPI
pyproject-apiProvides a programmatic API to read and…
permissive · top 5,000 on PyPI
conda-packconda-pack creates relocatable conda…
permissive · top 15,000 on PyPI