Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure returned code 256 - python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/lxml

Trying to build lxml on Python3.4: system does have libxml2 and libxslt.

pip build cannot ascertain MULTICORE(?), among other things(?)

Relevant versions downloaded:

  • lxml-3.4.1
  • libiconv-1.14
  • libxml2-2.9.2
  • libxslt-1.1.28

First, try standard build (dynamic):

$ CFLAGS="-O0" pip3 install lxml

builds without error, but:

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

Symbol IS present, however:

$ nm /usr/lib/python3.4/site-packages/lxml/etree.cpython-34m.so | grep __xmlStructuredErrorContext
         U __xmlStructuredErrorContext

But is 'local' in the underlying libxml2:

# nm /usr/lib/libxml2.so.2 | grep __xmlStructuredErrorContext
000d69d0 t __xmlStructuredErrorContext

OK, try to build STATIC, as is recommended:

$ 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

More extensive log: http://pastebin.com/P6T246QC

like image 687
DrLou Avatar asked Dec 19 '14 15:12

DrLou


People also ask

How to Fix python setup py egg_ info failed with error code 1?

The command python setup.py egg_info failed with error code 1 can also be caused by the pip itself. If you are using an old version of pip, we recommend you update it to the latest version. To do so, you just need to run python -m pip install -U pip in the elevated Command Prompt.

How do I install Python Setuptools?

Method 2: Using setup.py to install SetuptoolsStep 1: Download the latest source package of Setuptools for Python3 from the website. Step 3: Go to the setuptools-60.5. 0 folder and enter the following command to install the package.

How do you fix there was an error checking the latest version of pip?

Solve the Warning: There was an error checking the latest version of pip error. The best way to solve this error is to install or update the pip module to the latest version. Before installing the pip module make sure that all the dependencies for this module should be installed.


1 Answers

My attention was caught by this error:

**Exception: Command "make -j6" returned code 256**

Try to change your install command to this:

STATIC_DEPS=true CFLAGS="-O0" pip3 install lxml --install-option="--multicore=1"

Altough this is an old question, I hope it may help somebody.

like image 173
Ilario Pierbattista Avatar answered Sep 20 '22 23:09

Ilario Pierbattista