def get_pip_path():
 try:
  from virtualenv import path_locations
  (home_dir, lib_dir, inc_dir, bin_dir) = path_locations(sys.prefix)
  return os.path.join(bin_dir, u'pip')
 except ImportError:
  pass
 return u'pip'

def get_pip_path ( ) : try : from virtualenv import path_locations ( home_dir , lib_dir , inc_dir , bin_dir ) = path_locations ( sys . prefix ) return os . path . join ( bin_dir , u'pip' ) except ImportError : pass return u'pip'
try to figure out an explicit path to the pip executable script .