Can';t在Python中打开html5lib
我刚刚用Windows命令提示符安装了html5lib for Python。软件包安装在此处:Can';t在Python中打开html5lib,python,package,html5lib,Python,Package,Html5lib,我刚刚用Windows命令提示符安装了html5lib for Python。软件包安装在此处: File "C:\Python27\lib\site-packages\html5lib 但是,如果我尝试导入html5lib: #! /usr/bin/python import html5lib 我得到以下错误: Traceback (most recent call last): File "C:\Users\workspace\testhtml5\src\test.py", line 2
File "C:\Python27\lib\site-packages\html5lib
但是,如果我尝试导入html5lib:
#! /usr/bin/python
import html5lib
我得到以下错误:
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
回溯(最近一次呼叫最后一次):
文件“C:\Users\workspace\testhtml5\src\test.py”,第2行,在
导入html5lib
文件“C:\Python27\lib\site packages\html5lib\\uuuu init\uuuuu.py”,第16行,在
从.html5parser导入HTMLParser、parse、parseFragment
文件“C:\Python27\lib\site packages\html5lib\html5parser.py”,第2行,在
从六个导入,使用_元类
ImportError:没有名为six的模块
知道是什么导致了这个错误吗?谢谢您错过了
six
模块。您可以从下载它,或者更好地使用pip install six
可能的重复问题并不是一个重复的问题,它只是一个重复的答案。