title: Issues with pip
body: <p>I have been having permission issues with <code>pip</code>. </p>
  
  <p>I cannot run <code>pip3 -V</code> or <code>pip3.5 -V</code>. It gives me the following error:</p>
  
  <blockquote>
    <p>AttributeError: '_NamespacePath' object has no attribute 'sort'</p>
  </blockquote>
  
  <p>However, <code>pip -V</code> run fines. Then again <code>pip --user &lt;package-name&gt;</code> gives the same error.</p>
  
  <p>I also tried doing the same thing with Anaconda installation, but I have the same issue.</p>
  
  <p>I am new to python so I may be doing something trivially wrong.</p>
  
  <p>Relevant details:</p>
  
  <ol>
  <li><p>OS: Ubuntu 16.04</p></li>
  <li><p>Python versions: 2.7, 3, 3.5, 3.6 through Anaconda</p></li>
  </ol>
  
  <p>I have updated <code>setuptools</code> and <code>pip</code>.</p>
  
  <p>Relevant links that provided me some insight but the solution did not work:</p>
  
  <ol>
  <li><p><a href="https://github.com/pypa/pip/issues/4216" rel="nofollow noreferrer">pip GitHub 1</a></p></li>
  <li><p><a href="https://github.com/pypa/pip/issues/4935" rel="nofollow noreferrer">pip GitHub 2</a></p></li>
  </ol>
  
  <p>Error when issuing pip3 -V</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File
    "/usr/lib/python2.7/dist-packages/pip/_vendor/<strong>init</strong>.py", line 33,
    in vendored
        <strong>import</strong>(vendored_name, globals(), locals(), level=0) ImportError: No module named 'pip._vendor.pkg_resources'</p>
    
    <p>During handling of the above exception, another exception occurred:</p>
    
    <p>Traceback (most recent call last):   File "/usr/local/bin/pip3", line
    7, in 
        from pip import main   File "/usr/lib/python2.7/dist-packages/pip/<strong>init</strong>.py", line 13, in
    
        from pip.exceptions import InstallationError, CommandError, PipError   File "/usr/lib/python2.7/dist-packages/pip/exceptions.py",
    line 6, in 
        from pip._vendor.six import iteritems   File "/usr/lib/python2.7/dist-packages/pip/_vendor/<strong>init</strong>.py", line 75,
    in 
        vendored("pkg_resources")   File "/usr/lib/python2.7/dist-packages/pip/_vendor/<strong>init</strong>.py", line 36,
    in vendored
        <strong>import</strong>(modulename, globals(), locals(), level=0)   File "", line 969, in _find_and_load   File
    "", line 958, in _find_and_load_unlocked 
    File "", line 664, in _load_unlocked<br>
    File "", line 634, in
    _load_backward_compatible   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2927, in    File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2913, in _call_aside   File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2952, in _initialize_master_working_set   File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 956, in subscribe   File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2952, in    File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2515, in activate   File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2097, in declare_namespace   File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2047, in _handle_ns   File
    "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/<strong>init</strong>.py",
    line 2066, in _rebuild_mod_path AttributeError: '_NamespacePath'
    object has no attribute 'sort'</p>
  </blockquote>
  
  <p>Please feel free to ask more details.</p>