我在虛擬環境中安裝odoo系統。我在安裝lxml模塊時遇到了問題。錯誤:未知的分發選項:'bugtrack_url'
我正在使用「pip --trusted-host pypi.python.org install lxml」命令,但我收到一個錯誤消息。我曾嘗試下載源代碼,但發生同樣的錯誤。我在Linux下使用Python 2.7.9:
(odoo)[email protected] [~]# python -V
Python 2.7.9
(odoo)[email protected] [~]# uname -a
Linux des.desytec.com 2.6.32-042stab104.1 #1 SMP Thu Jan 29 12:58:41 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux
我已閱讀了很多關於此問題的頁面。有人說這是一個內存問題,而另一些人則說缺少libxml。這兩種情況都不適用於我。還有什麼可以的?
Collecting lxml
Downloading lxml-3.4.2.tar.gz (3.5MB)
/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.2.
Building without Cython.
Using build configuration of libxslt 1.1.17
Minimum required version of libxslt is 1.1.17, found 1.1.23
Building against libxml2/libxslt in the following directory: /usr/lib64
Installing collected packages: lxml
Running setup.py install for lxml
/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.2.
Building without Cython.
Using build configuration of libxslt 1.1.17
Minimum required version of libxslt is 1.1.17, found 1.1.23
Building against libxml2/libxslt in the following directory: /usr/lib64
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/tmp/pip-build-idzRLz/lxml/src/lxml/inclu$
In file included from src/lxml/lxml.etree.c:239:
/tmp/pip-build-idzRLz/lxml/src/lxml/includes/etree_defs.h:19:4: error: #error minimum required version of libxml2 is 2.7.0
/tmp/pip-build-idzRLz/lxml/src/lxml/includes/etree_defs.h:28:4: error: #error minimum required version of libxslt is 1.1.23
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_9XMLParser___init__’:
src/lxml/lxml.etree.c:103123: error: ‘XML_PARSE_HUGE’ undeclared (first use in this function)
src/lxml/lxml.etree.c:103123: error: (Each undeclared identifier is reported only once
src/lxml/lxml.etree.c:103123: error: for each function it appears in.)
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_10Schematron_6__call__’:
src/lxml/lxml.etree.c:176893: error: ‘XML_SCHEMATRON_OUT_ERROR’ undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
Complete output from command /home/odoo/odoo/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-idzRLz/lxml/setup.py';exec(compile(getattr(toke$
/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.2.
Building without Cython.
我有同樣的問題。你有沒有找到解決方案? – 2015-08-20 17:23:16