Skip to content

Instantly share code, notes, and snippets.

@umiphos
Last active July 3, 2018 20:24
Show Gist options
  • Save umiphos/6799416f62625acbef078eb15c2039f2 to your computer and use it in GitHub Desktop.
Save umiphos/6799416f62625acbef078eb15c2039f2 to your computer and use it in GitHub Desktop.
Check if a pgk is installed
"""If installed it will return 0"""
os.system('which your app')
import subprocess
retval = subprocess.call(["which", "packagename"])
if retval != 0:
print("Packagename not installed!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment