def virtualenv_no_global():
 site_mod_dir = os.path.dirname(os.path.abspath(site.__file__))
 no_global_file = os.path.join(site_mod_dir, 'no-global-site-packages.txt')
 if (running_under_virtualenv() and os.path.isfile(no_global_file)):
  return True

def virtualenv_no_global ( ) : site_mod_dir = os . path . dirname ( os . path . abspath ( site . __file__ ) ) no_global_file = os . path . join ( site_mod_dir , 'no-global-site-packages.txt' ) if ( running_under_virtualenv ( ) and os . path . isfile ( no_global_file ) ) : return True
return true if in a venv and no system site packages .