An alternate solution I just thought of: after failing to use psutil, try to import utmp (available as python-utmp). That failing, return an error. I'm not sure how old utmp is, but it is available on Ubuntu Precise whereas psutil on Precise is too old to have get_users(). Of course, with both psutil and utmp, it must be installed independently.