{"id":21782,"library":"pyproject2conda","title":"pyproject2conda","description":"A script to convert a Python project declared in pyproject.toml to a conda environment.yml. Current version 0.22.1, updated monthly by US National Institute of Standards and Technology.","status":"active","version":"0.22.1","language":"python","source_language":"en","source_url":"https://github.com/usnistgov/pyproject2conda","tags":["conda","pyproject.toml","environment.yml","converter"],"install":[{"cmd":"pip install pyproject2conda","lang":"bash","label":"Install via pip"},{"cmd":"conda install pyproject2conda -c conda-forge","lang":"bash","label":"Install via conda"}],"dependencies":[{"reason":"Used for YAML output","package":"ruamel.yaml","optional":false},{"reason":"CLI framework","package":"typer","optional":false}],"imports":[{"note":"Main conversion function","symbol":"convert","correct":"from pyproject2conda import convert"}],"quickstart":{"code":"from pyproject2conda import convert\nconvert('pyproject.toml', 'environment.yml')","lang":"python","description":"Convert pyproject.toml to conda environment.yml"},"warnings":[{"fix":"Use --pip-only flag or configure channels in your pyproject.toml.","message":"Default output uses conda channels; pip-only dependencies are included via pip section in environment.yml unless --pip-only flag is used.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Replace dashes with underscores in config file keys (e.g., 'output-file' -> 'output_file').","message":"Configuration file option names changed from dash to underscore in v0.21.0. Old config keys with dashes no longer work.","severity":"breaking","affected_versions":">=0.21.0"},{"fix":"Upgrade Python to 3.10 or later.","message":"Python 3.9 support was dropped. Requires Python >=3.10 as of v0.22.0.","severity":"deprecated","affected_versions":">=0.22.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install pyproject2conda` or `conda install pyproject2conda -c conda-forge`.","cause":"Library not installed.","error":"ModuleNotFoundError: No module named 'pyproject2conda'"},{"fix":"Use `convert('pyproject.toml', 'environment.yml')` to specify both input and output.","cause":"Missing output file argument when calling convert() function.","error":"TypeError: convert() missing 1 required positional argument: 'output'"},{"fix":"Ensure your pyproject.toml follows PEP 621 format with a [project] table.","cause":"The pyproject.toml file does not have a [project] section (PEP 621).","error":"ValueError: Invalid pyproject.toml: 'project' section not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}