title: Pip Import Error No module named logging
body: <p>Whenever I am running any command using pip, I am getting the following error. I have tried uninstalling python,pip and reinstalling them back again. I also used </p>
  
  <pre><code>sudo apt-get autoremove
  </code></pre>
  
  <p>and then updated and upgraded</p>
  
  <pre><code>sudo apt-get update
  sudo apt-get upgrade
  </code></pre>
  
  <p>And once again installed python and pip. I am still getting the same error whenever I run any command using pip.</p>
  
  <pre><code>Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in &lt;module&gt;
  from pip import main
  File "/home/shashank/.local/lib/python2.7/site-packages/pip/__init__.py", line 28, in &lt;module&gt;
  from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/home/shashank/.local/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in &lt;module&gt;
  from pip.download import path_to_url
  File "/home/shashank/.local/lib/python2.7/site-packages/pip/download.py", line 34, in &lt;module&gt;
  from pip.utils.logging import indent_log 
  ImportError: No module named logging
  </code></pre>
  
  <p>Can anybody suggest a solution?
  <strong>Edit</strong>
  I have read the question which is used to flag my question as a duplicate.
  I am not using a virtual environment and I have already tried the answer given over there. Moreover I am encountering a problem when I run pip in my terminal
  The output of the command</p>
  
  <pre><code>locate logging 
  
  /etc/java-9-openjdk/logging.properties
  /home/shashank/.local/share/Trash/files/logging.py
  /home/shashank/.local/share/Trash/files/logging.pyc
  /home/shashank/.local/share/Trash/info/logging.py.trashinfo
  /home/shashank/.local/share/Trash/info/logging.pyc.trashinfo
  /lib/lsb/init-functions.d/50-ubuntu-logging
  /usr/lib/jvm/java-9-openjdk-amd64/jmods/java.logging.jmod
  /usr/lib/jvm/java-9-openjdk-amd64/lib/logging.properties
  /usr/lib/pm-utils/sleep.d/00logging
  /usr/lib/python2.7/logging
  /usr/lib/python2.7/dist-packages/pip/utils/logging.py
  /usr/lib/python2.7/dist-packages/pip/utils/logging.pyc
  /usr/lib/python2.7/logging/__init__.py
  /usr/lib/python2.7/logging/__init__.pyc
  /usr/lib/python2.7/logging/config.py
  /usr/lib/python2.7/logging/config.pyc
  /usr/lib/python2.7/logging/handlers.py
  /usr/lib/python2.7/logging/handlers.pyc
  /usr/lib/python3/dist-packages/UnityTweakTool/config/logging.py
  /usr/lib/python3/dist packages/UnityTweakTool/config/__pycache__/logging.cpython-35.pyc
  /usr/lib/python3/dist-packages/plainbox/impl/logging.py
  /usr/lib/python3/dist-packages/plainbox/impl/__pycache__/logging.cpython-35.pyc
  /usr/lib/python3.5/logging
  /usr/lib/python3.5/logging/__init__.py
  /usr/lib/python3.5/logging/__pycache__
  /usr/lib/python3.5/logging/config.py
  /usr/lib/python3.5/logging/handlers.py
  /usr/lib/python3.5/logging/__pycache__/__init__.cpython-35.pyc
  /usr/lib/python3.5/logging/__pycache__/config.cpython-35.pyc
  /usr/lib/python3.5/logging/__pycache__/handlers.cpython-35.pyc
  /usr/share/icons/hicolor/16x16/categories/applications-microblogging-panel.png
  /usr/share/icons/ubuntu-mono-dark/categories/22/applications-microblogging-panel.svg
  /usr/share/icons/ubuntu-mono-dark/categories/24/applications-microblogging-panel.svg
   /usr/share/icons/ubuntu-mono-light/categories/22/applications-microblogging-panel.svg
  /usr/share/icons/ubuntu-mono-light/categories/24/applications-microblogging-panel.svg
  /usr/src/linux-headers-4.4.0-59-generic/include/config/fusion/logging.h
  /usr/src/linux-headers-4.4.0-59-generic/include/config/scsi/logging.h
  /usr/src/linux-headers-4.4.0-59-generic/include/config/sfc/mcdi/logging.h
  /usr/src/linux-headers-4.4.0-62-generic/include/config/fusion/logging.h
  /usr/src/linux-headers-4.4.0-62-generic/include/config/scsi/logging.h
  /usr/src/linux-headers-4.4.0-62-generic/include/config/sfc/mcdi/logging.h
  </code></pre>