title: How to properly handle conflicting distutils libraries with pip?
body: <p>After upgrade of <code>pip</code> version to <code>10.0.0</code>, installation with pip fails when there is a version conflict with a distutils installed package:</p>
  
  <pre><code>Cannot uninstall '***'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
  </code></pre>
  
  <p>This could be for <code>PyYAML, pyOpenSSL, urllib3, chardet</code> and so on.</p>
  
  <p>I try to manage this issue by uninstalling corresponding packages such as;</p>
  
  <pre><code>python-yaml python-openssl python-urllib3 python-chardet
  </code></pre>
  
  <p>with <code>apt-get</code> (Ubuntu) and then install those libraries again with <code>pip</code></p>
  
  <p>However as it might be expected removal by <code>apt-get</code> also results removal of many dependent additional system packages which seems not a good practice:</p>
  
  <pre><code>The following packages will be REMOVED:
  apt-xapian-index cloud-init landscape-client-ui-install oneconf python-aptdaemon python-aptdaemon.gtk3widgets python-chardet python-cupshelpers python-debian python-openssl python-pip python-requests python-ubuntu-sso-client python-urllib3 python-yaml sessioninstaller software-center ssh-import-id system-config-printer-common system-config-printer-gnome system-config-printer-udev ubuntu-desktop ubuntu-release-upgrader-gtk ubuntu-sso-client ubuntu-sso-client-qt update-manager update-notifier update-notifier-common
  </code></pre>
  
  <p>I also don't want to downgrade <code>pip</code> to an older version.</p>
  
  <p>So what is the best practice to handle conflicting distutils libraries with pip?</p>
  
  <p>Ps: I supposed <code>pip</code> is for easy management of <code>Python</code> libraries but this incident makes it enough complicated.</p>