title: ImportError: No module named operator
body: <p>I'm rather new to using python and haven't done really anything to configure python. my professor gave us an autograder.py file that checks our python code for correctness. the autograder.py file imports a file called grader.py which then imports something known as cgi (import cgi). inside this cgi file located at '/usr/lib/python2.7/cgi.py' there is a line of code that says </p>
  
  <pre><code>from operator import attrgetter
  </code></pre>
  
  <p>this is where the problem occurs. i recieve the following error</p>
  
  <blockquote>
  <pre><code>     Traceback (most recent call last):
        File "autograder.py", line 12, in &lt;module&gt;
          import grading
        File "/home/ggkfox/Documents/164-CSCI/1-Assignment/tutorial/grading.py", line 13, in &lt;module&gt;
          import cgi
        File "/usr/lib/python2.7/cgi.py", line 37, in &lt;module&gt;
          from operator import attrgetter
      ImportError: No module named operator
  </code></pre>
  </blockquote>
  
  <p>it is my understanding that the operator module should be built in (according to other stack overflow posts). this error only occurs when i use python2.7.12 (as opposed to python3.5). i have had a simular issue importing Tkinter in 2.7 aswell.</p>
  
  <p>also i want to say that i have tried uninstalling python using: </p>
  
  <pre><code>sudo apt-get purge python2.7
  </code></pre>
  
  <p>but it wont even uninstall for me to even attempt to reinstall. im not using any pipenv or desktopenv.</p>
  
  <p>i dont know what else to say, im very new to python coding.</p>