<p>我试图在Fedora服务器上运行一个python脚本。我得到以下错误。</p>
<pre><code>/usr/bin/python report_generation.py
Traceback (most recent call last):
File "report_generation.py", line 9, in ?
import lxml.html
ImportError: No module named lxml.html
</code></pre>
<p>做了一些研究,我发现它需要python lxml包来运行脚本。这台机器已经安装了一些lxml。但是,我做不到。</p>
<pre><code>yum search libxml
libxml2.i386 : Library providing XML and HTML support
libxml2.x86_64 : Library providing XML and HTML support
libxml2-devel.i386 : Libraries, includes, etc. to develop XML and HTML applications
libxml2-devel.x86_64 : Libraries, includes, etc. to develop XML and HTML applications
libxml2-python.x86_64 : Python bindings for the libxml2 library
libxslt.i386 : Library providing the Gnome XSLT engine
libxslt.x86_64 : Library providing the Gnome XSLT engine
libxslt-devel.i386 : Libraries, includes, etc. to embed the Gnome XSLT engine
libxslt-devel.x86_64 : Libraries, includes, etc. to embed the Gnome XSLT engine
libxslt-python.x86_64 : Python bindings for the libxslt library
</code></pre>
<p>而且,它还说当我试图安装这些软件包时,它们都是最新的。出于某种原因,它没有在运行脚本时提取lxml模块并抛出此错误。
我对Linux和Python都是新手。请为我提供调试此问题的任何线索。</p>