parameters: (dist_name, working_set=None)
return_statement: return dist.version if dist else None
docstring: Get the installed version of dist_name avoiding pkg_resources cache
docstring_summary: Get the installed version of dist_name avoiding pkg_resources cache
docstring_tokens: Get the installed version of dist_name avoiding pkg_resources cache
function: def get_installed_version(dist_name, working_set=None):
      """Get the installed version of dist_name avoiding pkg_resources cache"""
      # Create a requirement that we'll look for inside of setuptools.
      req = pkg_resources.Requirement.parse(dist_name)
  
      if working_set is None:
          # We want to avoid having this cached, so we need to construct a new
          # working set each time.
          working_set = pkg_resources.WorkingSet()
  
      # Get the installed distribution from our working set
      dist = working_set.find(req)
  
      # Check to see if we got an installed distribution or not, if we did
      # we want to return it's version.
      return dist.version if dist else None
function_tokens: def get_installed_version ( dist_name , working_set = None ) : # Create a requirement that we'll look for inside of setuptools. req = pkg_resources . Requirement . parse ( dist_name ) if working_set is None : # We want to avoid having this cached, so we need to construct a new # working set each time. working_set = pkg_resources . WorkingSet ( ) # Get the installed distribution from our working set dist = working_set . find ( req ) # Check to see if we got an installed distribution or not, if we did # we want to return it's version. return dist . version if dist else None