What\'s a good way to check if a package is installed while within a Python script? I know it\'s easy from the interpreter, but I need to do it within a script.
I g
You can use this:
class myError(exception): pass # Or do some thing like this. try: import mymodule except ImportError as e: raise myError("error was occurred")