Made path platform safe, changed pip import and call to subprocess.call to pip, moved 'except IOError' closer to potential source