Weird Error in scrapy (CENTOS 6.2)
Question: 
    >>> import scrapy
    >>> from scrapy.selector import HtmlXPathSelector
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.7/site-packages/Scrapy-0.14.4-py2.7.egg/scrapy/selector  /__init__.py", line 28, in <module>
        from scrapy.selector.lxmlsel import *
      File "/usr/local/lib/python2.7/site-packages/Scrapy-0.14.4-py2.7.egg/scrapy/selector /lxmlsel.py", line 7, in <module>
        from scrapy.utils.misc import extract_regex
      File "/usr/local/lib/python2.7/site-packages/Scrapy-0.14.4-py2.7.egg/scrapy/utils/misc.py", line 7, in <module>
        from w3lib.html import remove_entities
      File "/usr/local/lib/python2.7/site-packages/w3lib-1.2-py2.7.egg/w3lib/html.py", line 10, in <module>
        from w3lib.url import safe_url_string
      File "/usr/local/lib/python2.7/site-packages/w3lib-1.2-py2.7.egg/w3lib/url.py", line 11, in <module>
        import cgi
      File "/usr/local/lib/python2.7/cgi.py", line 51, in <module>
        import mimetools
      File "/usr/local/lib/python2.7/mimetools.py", line 6, in <module>
        import tempfile
      File "/usr/local/lib/python2.7/tempfile.py", line 34, in <module>
        from random import Random as _Random
      File "/usr/local/lib/python2.7/random.py", line 45, in <module>
        from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
      File "math.py", line 3, in <module>
       from scrapy.selector import HtmlXPathSelector
    ImportError: cannot import name HtmlXPathSelector
    

I am using python2.7, I used to work on ubuntu and I never faced this kind of
problem, but in CentOS I am getting this error, by the way I installed scrapy
thats why you can see the first command working perfectly.

    
    
    >>> import scrapy
    >>> from scrapy.selector import HtmlXPathSelector
    

One more thing, what "from scrapy.selector import HtmlXPathSelector" has to do
with math.py which is in the same folder


Answer: Well ... This is not a problem with you, rather with CentOS vs. Ubuntu.

How did you install it? using `pip` or `yum`?

If you installed it from `yum` most likely the package is broken... (just out
of curiosity, it would be good to know where you downloaded the package from).

