Cercando di compilare lxml su Python3.4: il sistema ha libxml2 e libxslt.configura il codice restituito 256 - python setup.py egg_info non è riuscito con il codice di errore 1 in/tmp/pip_build_root/lxml
pip build non può accertare MULTICORE, tra le altre cose
versioni rilevanti scaricati (?) (?):
- lxml-3.4.1
- libiconv-1.14
- libxml2-2.9 .2
- libxslt-1.1.28
In primo luogo, provare a costruire standard (dinamica):
$ CFLAGS="-O0" pip3 install lxml
costruisce senza errori, ma:
Python 3.4.2 (default, Dec 13 2014, 16:48:48)
[GCC 4.8.3] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: ld.so.1: isapython3.4: fatal: relocation error: file /usr/lib/python3.4/site-packages/lxml/etree.cpython-34m.so: symbol __xmlStructuredErrorContext: referenced symbol not found
simbolo è presente, però:
$ nm /usr/lib/python3.4/site-packages/lxml/etree.cpython-34m.so | grep __xmlStructuredErrorContext
U __xmlStructuredErrorContext
Ma è 'locale' nella sottostante libxml2:
# nm /usr/lib/libxml2.so.2 | grep __xmlStructuredErrorContext
000d69d0 t __xmlStructuredErrorContext
OK, cercare di costruire STATIC, come è raccomandato:
$ STATIC_DEPS=true CFLAGS="-O0" pip3 install lxml
...
**Exception: Command "make -j6" returned code 256**
Building lxml version 3.4.1.
Latest version of libiconv is 1.14
Latest version of libxml2 is 2.9.2
Latest version of libxslt is 1.1.28
...
Starting build in build/tmp/libiconv-1.14
----------------------------------------
Cleaning up... Removing temporary dir /tmp/pip_build_root...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/lxml
Exception information:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args) File "/usr/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python3.4/site-packages/pip/req.py", line 1229, in prepare_files
req_to_install.run_egg_info() File "/usr/lib/python3.4/site-packages/pip/req.py", line 325, in run_egg_info command_desc='python setup.py egg_info')
File "/usr/lib/python3.4/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/lxml
più estese di registro: http://pastebin.com/P6T246QC
Per il primo caso, quali librerie fanno la libreria 'etree * so' a (' ldd ... ')? La mia ipotesi sarebbe che 'xmlStructuredErrorContext' manchi in uno di questi, forse perché una delle librerie collegate lo ha deprecato in futuro, o invece lo manca perché è troppo vecchio. – Evert
per la build dinamica, trova ad esempio il sistema libs - v2.9.2 di libxml2. Un altro poster suggerisce che la bandiera "locale" sul simbolo potrebbe essere il problema? Ha senso? # nm /usr/lib/libxml2.so.2 | grep __xmlStructuredErrorContext 000d69d0 t __xmlStructuredErrorContext – DrLou
Prova ad usare una distribuzione python come [this] (http://continuum.io/downloads). Mi ha aiutato con problemi lxml in particolare, tra molte altre cose. – bahmait