title: How to completely reset everything Python to default in Ubuntu 18.04?
body: <p>Edit:</p>
  
  <p>So now <code>which pip</code>,  <code>which python</code> and <code>which python3</code> have started working correctly somehow. I was also able to install libraries using pip. The only remaining problem is that of the apt_pkg.  Running <code>apt-get install python-apt</code> gives: </p>
  
  <pre><code>Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  python-apt is already the newest version (1.6.3ubuntu1).
  </code></pre>
  
  <p>Running any python application still gives error: <code>ImportError: No module named apt_pkg</code></p>
  
  <p>Running <code>echo $PATH</code> returns:</p>
  
  <pre><code>/home/hamza/bin:/home/hamza/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  </code></pre>
  
  <p>Running <code>find /usr -name python -o -name python3</code> returns:</p>
  
  <pre><code>/usr/local/lib/python3.5/dist-packages/notebook/static/components/codemirror/mode/python
  /usr/local/lib/python2.7/dist-packages/notebook/static/components/codemirror/mode/python
  /usr/lib/python3
  /usr/lib/gimp/2.0/python
  /usr/lib/libreoffice/share/Scripts/python
  /usr/lib/virtualbox/sdk/bindings/xpcom/python
  /usr/lib/wx/python
  /usr/bin/python
  /usr/bin/python3
  /usr/share/code/resources/app/extensions/python
  /usr/share/bash-completion/helpers/python
  /usr/share/bash-completion/completions/python
  /usr/share/bash-completion/completions/python3
  /usr/share/python
  /usr/share/javascript/codemirror/mode/python
  /usr/share/python3
  /usr/share/lintian/overrides/python
  /usr/share/lintian/overrides/python3
  /usr/share/gcc-8/python
  /usr/share/gdb/python
  /usr/share/librevenge/python
  /usr/share/doc/python
  /usr/share/doc/python3
  /usr/share/doc/python-statsmodels/examples/python
  /usr/share/playonlinux/python
  </code></pre>
  
  <p>Original:</p>
  
  <p>Python on my system is a wreck. I have got multiple versions installed. None work properly. Apparently some applications using python are not  working either (eg: Unity Tweaks). My python libraries will not install because pip doesn't work, although it says it is already installed</p>
  
  <p>I was trying to install some libraries for python on my system using pip. Turned out pip was not working. I tried to reinstall pip only to learn that pip was already installed. I went through a process of understanding  the difference between <code>python</code> and <code>python3</code>. I have tried enough things and have basically lost track of the things I have done to get the libraries installed. Long story short, pip does not work no matter what, my libraries will not install and consequently my code doesn't run.</p>
  
  <p>Here is some of the things I have already done:</p>
  
  <pre><code>which pip
  </code></pre>
  
  <p>This return no output</p>
  
  <pre><code>apt-get install python-pip  
  </code></pre>
  
  <p>Says I have pip already installed</p>
  
  <pre><code>apt-get install python-apt
  </code></pre>
  
  <p>To resolve <code>ImportError: No module named apt_pkg</code>. It says:</p>
  
  <pre><code>Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  python-apt is already the newest version (1.6.3ubuntu1).
  </code></pre>
  
  <p>But the error persists</p>
  
  <p>And countless other stuff I do not remember.</p>
  
  <p>What I want now is simple. I wish to somehow get out of this hassle by resetting all of my python settings and installation to default, and then install the pandas and numpy libraries for my system. Any and all help would be appreciated.</p>
  
  <p>Result for <code>python -m pip -V</code>:</p>
  
  <pre><code>pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
  </code></pre>
  
  <p>Result for <code>python3 -m pip -V</code>:</p>
  
  <pre><code>pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)
  </code></pre>