Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't open html5lib in Python

I just installed html5lib for Python with Windows Command Prompt. The package was installed here:

File "C:\Python27\lib\site-packages\html5lib

However, if I try to import html5lib:

#! /usr/bin/python
import html5lib

I get the following error:

Traceback (most recent call last):
File "C:\Users\workspace\testhtml5\src\test.py", line 2, in <module>
import html5lib
File "C:\Python27\lib\site-packages\html5lib\__init__.py", line 16, in <module>
from .html5parser import HTMLParser, parse, parseFragment
File "C:\Python27\lib\site-packages\html5lib\html5parser.py", line 2, in <module>
from six import with_metaclass
ImportError: No module named six

Any idea on what might be causing the error? Thanks

like image 641
LaGuille Avatar asked Apr 30 '26 02:04

LaGuille


1 Answers

You're missing the six module. You can download it from here, or better, use pip install six .

like image 157
zmbq Avatar answered May 02 '26 14:05

zmbq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!