通过Pip安装PyQuery

托拉

我正在尝试通过安装PyQuerypip但出现了一个我不明白的错误。我使用的命令是:

sudo pip install pyquery

我得到以下输出:

Requirement already satisfied (use --upgrade to upgrade): pyquery in /usr/local/lib/python2.7/dist-packages
Downloading/unpacking lxml>=2.1 (from pyquery)
Running setup.py egg_info for package lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
  warnings.warn(msg)
Building lxml version 3.3.0.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt

Downloading/unpacking cssselect (from pyquery)
Running setup.py egg_info for package cssselect

no previously-included directories found matching 'docs/_build'
Installing collected packages: lxml, cssselect
Running setup.py install for lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
  warnings.warn(msg)
Building lxml version 3.3.0.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/imageek/scripts/facebook/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-i686-2.7/src/lxml/lxml.etree.o -w
src/lxml/lxml.etree.c:16:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/imageek/scripts/facebook/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-dyUZWZ-record/install-record.txt:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'

warnings.warn(msg)

Building lxml version 3.3.0.

Building without Cython.

ERROR: /bin/sh: 1: xslt-config: not found



** make sure the development packages of libxml2 and libxslt are installed **



Using build configuration of libxslt

running install

running build

running build_py

copying src/lxml/includes/lxml-version.h -> build/lib.linux-i686-2.7/lxml/includes

running build_ext

building 'lxml.etree' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/imageek/scripts/facebook/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-i686-2.7/src/lxml/lxml.etree.o -w

src/lxml/lxml.etree.c:16:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/imageek/scripts/facebook/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-dyUZWZ-record/install-record.txt failed with error code 1
Storing complete log in /home/imageek/.pip/pip.log

我感觉这与依赖关系有关,但是“ pip”是否应该不自动安装依赖关系?

潘乔·杰(Pancho Jay)

您缺少依赖项。尝试运行:

sudo apt-get install libxml2-dev libxslt1-dev python-dev

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

通过Pip安装PyQuery

来自分类Dev

通过pip安装xGoogle?

来自分类Dev

如何通过pip安装?

来自分类Dev

无法通过pip安装lxml

来自分类Dev

通过pip for python安装模块

来自分类Dev

通过pip安装netmiko的问题

来自分类Dev

无法通过 pip 安装 scipy

来自分类Dev

通过pip安装gnureadline时出错

来自分类Dev

我无法通过pip安装Kivy

来自分类Dev

如何通过pip安装Websocket 8.1

来自分类Dev

通过pip或easy_install安装wxpython

来自分类Dev

通过pip可选安装-ipython示例

来自分类Dev

通过pip安装pybloomfiltermmap版本0.3.14

来自分类Dev

Python通过pip安装硒的早期版本

来自分类Dev

通过 pip 从 PyPi 运行安装后代码

来自分类Dev

无法通过 pip 安装任何包

来自分类Dev

无法在 Windows 中通过 pip 安装 wowpalwabbit

来自分类Dev

pip冻结:仅显示通过pip安装的软件包

来自分类Dev

pip冻结列出通过pip卸载,然后通过Pacman重新安装的软件包

来自分类Dev

如何通过pip为Python 3.5安装Pygame?

来自分类Dev

无法通过pip安装数据集软件包

来自分类Dev

通过pip(PyPI)安装Python实时依赖项

来自分类Dev

更改通过pip安装的django软件包的设置

来自分类Dev

intellij无法识别通过pip安装的python导入

来自分类Dev

通过pip安装pyinstaller导致“创建过程失败”

来自分类Dev

如何通过pip安装twilio软件包?

来自分类Dev

无法通过在Python 3.4上运行的pip安装模块

来自分类Dev

通过PIP安装了NPM,但得到“ npm:找不到命令”

来自分类Dev

尝试通过Pycharm中的pip安装numpy时出错