Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下载lxml-2.3.3.tar.gz
解压然后在文件夹下运行 sudo python setup.py build
python selftest.py => 184 次测试正常。
将 lxml 文件夹 lxml-2.3.3\src\lxml 提取到我的 python 路径
运行应用程序将导致错误 - XML 方面的使用需要 lxml
这是构建和安装的正确方法吗?
构建后,您必须使用安装
python setup.py install
简单地将文件夹复制到 python 路径是行不通的。
或者你可以只使用pip并运行
pip install lxml
对于 Windows,您可以从此windows python lib 站点下载预构建模块。请注意,这是非官方的,但受到高度尊重。