def get_site_packages_directory():
 import site
 try:
  loc = site.getsitepackages()
  print ('  tl.ops : site-packages in ', loc)
  return loc
 except:
  print '  tl.ops : Cannot find package dir from virtual environment'
  return False

def get_site_packages_directory ( ) : import site try : loc = site . getsitepackages ( ) print ( '  tl.ops : site-packages in ' , loc ) return loc except : print '  tl.ops : Cannot find package dir from virtual environment' return False
print and return the site-packages directory .