【发布时间】:2017-04-29 22:07:38
【问题描述】:
wheel 是分发预编译包以通过 pip 安装的新方法。
lxml entry on pypi 有可用于“manylinux”的轮子。我正在运行 ubuntu。
但是,当我尝试 pip install lxml 时,它似乎仍然在尝试编译。任何想法为什么?
mktmpenv
pip install lxml==3.6.4
Collecting lxml==3.6.4
Using cached lxml-3.6.4.tar.gz
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml
Complete output from command /home/harry/.virtualenvs/tmp-940224e01c89b3f0/bin/python3 -c "import setuptools;__file__='/tmp/pip-build-gxw05tyo/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp78u4a871pip-wheel-:
Building lxml version ....
Building lxml version 3.6.4.
Building without Cython.
Using build configuration of libxslt 1.1.29
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
[...etc]
有什么想法吗?
【问题讨论】:
-
一些模块使用 C/C++ 代码,作者决定不编译它。您不会自己编译 - pip 会为您完成。在 Linux Mint(基于 Ubuntu 14.04)上编译 lxml 时我从来没有遇到过问题
-
如果你想要预编译的 lxml 然后使用Anaconda - 它会安装 Python 并为此 Python 版本预编译 lxml 和其他模块。
-
感谢@furas,我实际上可以很好地安装软件包,我的问题是为什么 pip 想要编译,即使有预编译的轮子可用。已经澄清了我的帖子。
-
你安装了什么pip版本?什么轮子版本?
-
你有
Using cached lxml-3.6.4.tar.gz,所以可以试试--no-cache-dir
标签: python ubuntu pip lxml python-wheel