{"id":24287,"library":"py-rattler","title":"Py-Rattler","description":"A blazing fast Python library to work with the conda ecosystem, built on top of the Rust rattler libraries. Current version 0.23.2. Release cadence is active, with frequent updates.","status":"active","version":"0.23.2","language":"python","source_language":"en","source_url":"https://github.com/conda/rattler","tags":["conda","package-management","environment-management"],"install":[{"cmd":"pip install py-rattler","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Required for HTTPS requests","package":"certifi","optional":false}],"imports":[{"note":"CondaGateway was renamed to Gateway in v0.20","wrong":"from rattler import CondaGateway","symbol":"Gateway","correct":"from rattler import Gateway"},{"note":"The module is named solver, not solve","wrong":"from rattler import solve","symbol":"solve","correct":"from rattler import solver"}],"quickstart":{"code":"import os\nfrom rattler import Gateway, Channel, PrefixRecord\n\n# Initialize gateway with custom channels\ngateway = Gateway()\n# Query some packages\npackage_names = [\"python\", \"numpy\"]\nchannel = Channel(\"conda-forge\")\nfor name in package_names:\n    pkg_info = gateway.query(channel, name)\n    print(f\"Latest version of {name}: {pkg_info[0].version if pkg_info else 'not found'}\")","lang":"python","description":"Basic example: query conda-forge for package information."},"warnings":[{"fix":"Use `from rattler import ...` instead of `from rattler_conda import ...`","message":"In v0.20, the main module was renamed from rattler_conda to rattler. Import paths changed.","severity":"breaking","affected_versions":"<0.20"},{"fix":"Use `from rattler import solver`","message":"The solver module is named 'solver', not 'solve'. Many first-timers import the wrong name.","severity":"gotcha","affected_versions":"all"},{"fix":"Explicitly pass channels or prefix when creating Gateway if needed.","message":"Gateway constructor may need a custom prefix or channels. By default it uses the current conda environment.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to `from rattler import ...`","cause":"Outdated import path from version <0.20","error":"ModuleNotFoundError: No module named 'rattler_conda'"},{"fix":"Use `from rattler import solver`","cause":"Attempted to import 'solve' instead of 'solver'","error":"AttributeError: module 'rattler' has no attribute 'solve'"},{"fix":"Verify channel URL is valid and you have internet access. Use explicit channel like `Channel('conda-forge')`","cause":"Network issues or incorrect channel URL","error":"rattler.gateway.GatewayError: failed to load repodata"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}