不能安装lxml,使用Enthought Canopy,它想要VBS 2008



前言:我是CLI和Python的新手,对Canopy几乎一无所知,并且还没有找到解决这个问题的方法。

尝试通过pip安装lxml(类分配所需),并且Canopy错误地说它找不到xslt-config命令,但继续。后来它真的卡住了/锁定了找不到Visual Studio 2008的错误,但提供了"尝试MinGW作为解决方案"。他们建议的命令返回"无法找到setup.py"错误,我无法找出MinGW在该目录中的位置。

TL;DR - lxml安装似乎由于xslt-config问题而失败,b/c Canopy希望在此之后使用Visual Studio 2008。请帮我让lxml工作。

终端响应的初始块如下:

Downloading lxml-3.3.5.tar.gz (3.5Mb): 3.5Mb downloaded
Running setup.py egg_info for package lxml
Building lxml version 3.3.5.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
* make sure the development packages of libxml2 and libxslt are installed *

代码经过几次/变化,然后继续复制一些东西,直到它到达这个块:

running build_ext
building 'lxml.etree' extension
C:UsersOwninatorAppDataLocalEnthoughtCanopy32Appappdatacanopy-1.4.0.193
8.win-x86libdistutilsdist.py:267: UserWarning: Unknown distribution option: '
bugtrack_url'
warnings.warn(msg)
error: Could not find Visual Studio 2008 in your path.
提供

To use the MinGW compiler to build an extension module, use
the '-c' flag, e.g.:
python setup.py build_ext -c mingw64

但是,当我安装MinGW并使用该命令时,我得到一个错误,它找不到setup.py.

到目前为止,在Canopy中安装lxml最简单的方法是使用包管理器。它可以从欢迎屏幕或Tools > Package manager菜单项中访问。确保在包管理器左侧的菜单上选择了"Available packages",并在搜索框中输入lxml。它会给你一个小按钮来安装它

最新更新