help installing pyquery

A forum for general discussion of the Python programming language.

help installing pyquery

Postby kiptip » Mon Oct 28, 2013 10:01 pm

Hi, I'm using XFCE and have used pip to install pyquery. However when I import pyquery I get the following response.
Code: Select all
>>> import pyquery

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import pyquery
  File "/usr/local/lib/python2.6/dist-packages/pyquery/", line 11, in <module>
    from .pyquery import PyQuery
  File "/usr/local/lib/python2.6/dist-packages/pyquery/", line 6, in <module>
    from .cssselectpatch import JQueryTranslator
  File "/usr/local/lib/python2.6/dist-packages/pyquery/", line 7, in <module>
    from cssselect import xpath as cssselect_xpath
  File "", line 24, in <module>
    class CSSSelector(etree.XPath):
AttributeError: 'module' object has no attribute 'XPath'

I've tried removing pyquery, lxml, cssselect etc, then re-installing them to not avail
Last edited by micseydel on Mon Oct 28, 2013 10:15 pm, edited 1 time in total.
Reason: Code tags, locked OP.
Posts: 1
Joined: Mon Oct 28, 2013 9:56 pm

Re: help installing pyquery

Postby micseydel » Mon Oct 28, 2013 10:20 pm

Do you have your own local file called If so, removing it will fix the problem.

If not, I'd like to see the first 30 lines of
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Return to General Discussions

Who is online

Users browsing this forum: Google [Bot] and 4 guests