擅长:python、mysql、java
<p>我在Linux上也遇到过类似的问题(见下面的stacktrace)。
在Ubuntu11.10(Python2.7)和Gentoo(Python2.6)的virtualenv中安装了pytidylib==0.2.1。
在Ubuntu上安装<code>apt-get install libtidy-dev</code>,在Gentoo上安装<code>emerge app-text/htmltidy</code>,解决了这个问题。在</p>
<pre>
File "/home/andre/Progz/some_site/djcode/apps/default/tests.py", line ?, in default.tests.__test__.doctest
Failed example:
from tidylib import tidy_document
Exception raised:
Traceback (most recent call last):
File "/home/andre/Progz/some_site/lib/python2.6/site-packages/django/test/_doctest.py", line 1267, in __run
compileflags, 1) in test.globs
File "", line 1, in
from tidylib import tidy_document
File "/home/andre/Progz/some_site/lib/python2.6/site-packages/tidylib/__init__.py", line 71, in
raise OSError("Could not load libtidy using any of these names: %s" % (",".join(LIB_NAMES)))
OSError: Could not load libtidy using any of these names: libtidy,libtidy.so,libtidy-0.99.so.0,cygtidy-0-99-0,tidylib,libtidy.dylib,tidy
</pre>