title: Python3-pip3 : AttributeError: '_NamespacePath' object has no attribute 'sort'
body: <p>Please bear with me as this question comes again.</p>
  
  <p>I am on Ubuntu 16.04 I tried to install Kmodes with pip3 but I get this error. I tried removing pip/pip3 from scratch and re-install it didn't solve the problem.</p>
  
  <p>I found previous questions about the same issue but It didn't address it like <code>pip3 install --upgrade pip setuptools</code>.</p>
  
  <p>What is the solution to this problem and what can I do to solve it?</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/bin/pip3", line 9, in &lt;module&gt;
      from pip import main
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/__init__.py", line 26, in &lt;module&gt;
      from pip.utils import get_installed_distributions, get_prog
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 27, in &lt;module&gt;
      from pip._vendor import pkg_resources
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in &lt;module&gt;
      @_call_aside
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
      f(*args, **kwargs)
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
      dist.activate(replace=False)
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
      declare_namespace(pkg)
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
      _handle_ns(packageName, path_item)
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
      _rebuild_mod_path(path, packageName, module)
    File "/home/stambouli/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
      orig_path.sort(key=position_in_sys_path)
  AttributeError: '_NamespacePath' object has no attribute 'sort'
  </code></pre>