pip install does not install cssselect dependency

Bug #1750881 reported by George Pantazes on 2018-02-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When installing lxml via pip using

pip install lxml

it doesn't install the dependency of cssselect needed to run the sample code at http://lxml.de/cssselect.html

$ python
Python 3.6.4 (default, Jan 6 2018, 11:51:15)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml.cssselect import CSSSelector
Traceback (most recent call last):
  File "/Users/georgep/Envs/spanishdict-scraper-kyryJhpS/lib/python3.6/site-packages/lxml/cssselect.py", line 13, in <module>
    import cssselect as external_cssselect
ModuleNotFoundError: No module named 'cssselect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/georgep/Envs/spanishdict-scraper-kyryJhpS/lib/python3.6/site-packages/lxml/cssselect.py", line 16, in <module>
    'cssselect does not seem to be installed. '
ImportError: cssselect does not seem to be installed. See http://packages.python.org/cssselect/

Proposed fix: add cssselect as a dependency to the lxml pip installation.
Or alternatively, make it more clear how to install these optional dependencies in the installation notes at http://lxml.de/installation.html.

## --
Python : sys.version_info(major=3, minor=6, micro=4, releaselevel='final', serial=0)
lxml.etree : (4, 1, 1, 0)
libxml used : (2, 9, 7)
libxml compiled : (2, 9, 7)
libxslt used : (1, 1, 32)
libxslt compiled : (1, 1, 32)
## -----

scoder (scoder) wrote :
Changed in lxml:
assignee: nobody → scoder (scoder)
importance: Undecided → Low
status: New → Fix Committed
milestone: none → 4.2.0
scoder (scoder) on 2019-01-04
Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers