Python 2.7 on Mac OSX. Corrupt module of framework
<p>I'm learning python and made a program on Mac OSX El Capitan and the code was working fine but randomly it started givving me errors without me changing anything in the code. I keep getting this Message:</p>

<pre>
Traceback (most recent call last):
  File "time.py", line 2, in &lt;module>
    from lxml import html
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-3.6.4-py2.7-macosx-10.6-intel.egg/lxml/html/__init__.py", line 54, in &lt;module>
    from .. import etree
  File "src/lxml/serializer.pxi", line 4, in init lxml.etree (src/lxml/lxml.etree.c:218282)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 8, in &lt;module>
    import struct, sys, time, os
  File "/Users/user/Desktop/time.py", line 2, in &lt;module>
    from lxml import html
ImportError: cannot import name html
</pre>

<p>I have everything installed including:</p>

<pre><code>from lxml import html
from tabulate import tabulate
import requests
import datetime
</code></pre>

<p>I'm not sure what happened. I even used Homebrew to uninstall and reinstall python2.7 and still getting the same error.</p>

<p>What is going on?</p>

<p>Thanks for the help. I changed the name of the file to t.py like ShreevatsaR said. Also put the file on Desktop, and I have everything installed through pip. For some odd reason I installed requests and tabulate manually by downloading them and running setup.py and vuala!! It worked!</p>

<p>user3543300, maybe the pip was installing it on the homebrew because it acted like they're not there. When I ran which python it gave me this:
/usr/local/bin/python</p>

python osx