{"id":23842,"library":"hatch-pip-compile","title":"Hatch Pip Compile","description":"A Hatch plugin that uses pip-compile (from pip-tools) to manage project dependencies, generating lockfiles and resolving versions. Current version 1.11.6, updated January 2026. Active development with regular bug fixes.","status":"active","version":"1.11.6","language":"python","source_language":"en","source_url":"https://github.com/juftin/hatch-pip-compile","tags":["hatch","pip-compile","lockfile","dependencies","plugin"],"install":[{"cmd":"pip install hatch-pip-compile","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required as Hatch plugin host","package":"hatchling","optional":false},{"reason":"Provides pip-compile executable used for lockfile generation","package":"pip-tools","optional":false}],"imports":[{"note":"Wrong top-level import; HatchPipCompileBase is in plugin module","wrong":"from hatch_pip_compile import HatchPipCompileBase","symbol":"HatchPipCompileBase","correct":"from hatch_pip_compile.plugin import HatchPipCompileBase"}],"quickstart":{"code":"# Add to pyproject.toml under [tool.hatch.envs.default]\n# pip-compile = true\n# lockfile = \"requirements.lock\"\n\n# Then run:\n# hatch env create","lang":"python","description":"Enable pip-compile lockfile management for Hatch environments by adding configuration to pyproject.toml."},"warnings":[{"fix":"Add 'installer = \"uv\"' to [tool.hatch.envs.default] in pyproject.toml if you want uv-based resolution.","message":"The lockfile is generated using pip-compile but the environment installation uses pip, not uv by default. To use uv, set installer = \"uv\" in [tool.hatch.envs.default].","severity":"gotcha","affected_versions":">=1.11.0"},{"fix":"Use 'from hatch_pip_compile.plugin import HatchPipCompileBase' instead of the previous class.","message":"In v1.11.0, the plugin migrated to HatchPipCompileBase. If you imported or subclassed the old plugin class, your code may break.","severity":"breaking","affected_versions":">=1.11.0"},{"fix":"Ensure environment variable is exactly HATCH_PIP_COMPILE_LOCKFILE (all caps) to override lockfile path.","message":"The plugin reads environment variables like HATCH_PIP_COMPILE_LOCKFILE to override lockfile path, but the variable name case matters. Common mistake: using HATCH_PIP_COMPILE_LOCKFILE instead of the correct HATCH_PIP_COMPILE_LOCKFILE.","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":"Set the environment variable or remove the override from configuration.","cause":"The plugin expects the environment variable to be set but it is missing.","error":"KeyError: 'HATCH_PIP_COMPILE_LOCKFILE'"},{"fix":"Install the package: 'pip install hatch-pip-compile'. Then import correctly: 'from hatch_pip_compile.plugin import HatchPipCompileBase'.","cause":"The package is not installed or the import path is wrong.","error":"ModuleNotFoundError: No module named 'hatch_pip_compile'"},{"fix":"Install pip-tools: 'pip install pip-tools' or ensure your base Python has it.","cause":"pip-tools is not installed in the environment where Hatch runs.","error":"pip-compile: command not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}