title: pip is giving conflict error while installing package
body: <p>While running <code>$ pip install &lt;package&gt;</code>, I am getting below error, in this case I am installing PyJWT and also checked for other packages to crosscheck. This happened after upgrading pip to 19.0.2 from 19.0.1.</p>
  
  <p>Check below errors while running pip install PyJWT, requirement are already satisfied, but still I am getting error, please suggest how to fix it.</p>
  
  <pre><code>$ easy_install pip 
  </code></pre>
  
  <p>for reinstalling the pip.</p>
  
  <pre><code>$ pip install PyJWT
  
  Tejeshs-MacBook-Air:selenium_testing tejeshagrawal$ pip install PyJWT
  Requirement already satisfied: PyJWT in
  /usr/local/lib/python3.7/site-packages (1.7.1) Error checking for
  conflicts. Traceback (most recent call last):   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2897, in _dep_map
      return self.__dep_map   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2691, in __getattr__
      raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map
  
  **During handling of the above exception, another exception occurred:**
  
  Traceback (most recent call last):   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2888, in _parsed_pkg_info
      return self._pkg_info   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2691, in __getattr__
      raise AttributeError(attr) AttributeError: _pkg_info
  
  **During handling of the above exception, another exception occurred:**
  
  Traceback (most recent call last):   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/commands/install.py",
  line 503, in _warn_about_conflicts
      package_set, _dep_info = check_install_conflicts(to_install)   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/check.py",
  line 108, in check_install_conflicts
      package_set, _ = create_package_set_from_installed()   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/check.py",
  line 47, in create_package_set_from_installed
      package_set[name] = PackageDetails(dist.version, dist.requires())   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2635, in requires
      dm = self._dep_map   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2899, in _dep_map
      self.__dep_map = self._compute_dependencies()   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2908, in _compute_dependencies
      for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2890, in _parsed_pkg_info
      metadata = self.get_metadata(self.PKG_INFO)   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 1410, in get_metadata
      value = self._get(self._fn(self.egg_info, name))   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 1522, in _get
      with open(path, 'rb') as stream: FileNotFoundError: [Errno 2] No such file or directory:
  '/usr/local/lib/python3.7/site-packages/~ip-18.1.dist-info/METADATA'
  Tejeshs-MacBook-Air:selenium_testing tejeshagrawal$ pip freeze &gt;
  require.txt Could not parse requirement: -ip Exception: Traceback
  (most recent call last):   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2584, in version
      return self._version   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2691, in __getattr__
      raise AttributeError(attr) AttributeError: _version
  
  **During handling of the above exception, another exception occurred:**
  
  Traceback (most recent call last):   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/cli/base_command.py",
  line 179, in main
      status = self.run(options, args)   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/commands/freeze.py",
  line 93, in run
      for line in freeze(**freeze_kwargs):   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/freeze.py",
  line 62, in freeze
      req = FrozenRequirement.from_dist(dist)   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/freeze.py",
  line 239, in from_dist
      req = dist.as_requirement()   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2716, in as_requirement
      if isinstance(self.parsed_version, packaging.version.Version):   File
  "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2551, in parsed_version
      self._parsed_version = parse_version(self.version)   File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
  line 2589, in version
      raise ValueError(tmpl % self.PKG_INFO, self) ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version]
  (/usr/local/lib/python3.7/site-packages))
  </code></pre>