最近用到tidy来规范html

安装pytidylibeasy_install

  1. easy_install pytidylib 

 

  1. In [2]: import tidylib 
  2. --------------------------------------------------------------------------- 
  3. OSError                                   Traceback (most recent call last) 
  4. /home/yongbing.chen/news/<ipython-input-2-bb55402b3119> in <module>() 
  5. ----> 1 import tidylib 
  6.  
  7. /home/yongbing.chen/news/build/bdist.linux-x86_64/egg/tidylib/__init__.py in <module>() 
  8.  
  9. 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 
  10.  
  11. In [3]: from tidylib import tidy_document 
  12. --------------------------------------------------------------------------- 
  13. OSError                                   Traceback (most recent call last) 
  14. /home/yongbing.chen/news/<ipython-input-3-b8d713f876b4> in <module>() 
  15. ----> 1 from tidylib import tidy_document 
  16.  
  17. /home/yongbing.chen/news/build/bdist.linux-x86_64/egg/tidylib/__init__.py in <module>() 
  18.  
  19. 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 

需要安装libtidy-devel