def checkInstalledPip(package, speak=True, speakSimilar=True):
packages = sorted([i.key for i in pip.get_installed_distributions()])<EOL>installed = package in packages<EOL>similar = None<EOL>if not installed:<EOL><INDENT>similar = [pkg for pkg in packages if package in pkg]<EOL><DEDENT>if speak:<EOL><INDENT>speakInstalledPackages(package, "<STR_LIT>", installed, similar, speakSimilar)<EOL><DEDENT>return (installed, similar)<EOL>
checks if a given package is installed on pip