diff --git a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py index 5a3a91939175..11687e585121 100644 --- a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py +++ b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py @@ -78,7 +78,7 @@ def test_requirement(requirement: Requirement) -> bool: error(f"{package_name} not installed") return False - if package.version not in requirement.specifier: + if requirement.specifier and package.version not in requirement.specifier: error( f"{package_name}{requirement.specifier} not satisfied by version {package.version}" )