我刚刚用Windows命令提示符为Python安装了html5lib。软件包安装在这里:
File "C:Python27libsite-packageshtml5lib
但是,如果我尝试导入html5lib:
#! /usr/bin/python
import html5lib
我得到以下错误:
Traceback (most recent call last):
File "C:Usersworkspacetesthtml5srctest.py", line 2, in <module>
import html5lib
File "C:Python27libsite-packageshtml5lib__init__.py", line 16, in <module>
from .html5parser import HTMLParser, parse, parseFragment
File "C:Python27libsite-packageshtml5libhtml5parser.py", line 2, in <module>
from six import with_metaclass
ImportError: No module named six
你知道是什么原因导致了这个错误吗?感谢
您缺少six
模块。您可以从这里下载,或者更好地使用pip install six
。