On 2015-04-09 09:11, Stefan Behnel wrote:

It's solved already. :)

All you need to do is install the "-dev" package that goes with your Python installation, e.g. "python3-dev" should match Python 3.4 in current Ubuntu
releases.

The reason why it's in a separate package is that many people actually
don't need this, e.g. when they only install plain Python packages or use
the Ubuntu provided binary packages that they can install via apt (e.g.
"sudo apt-get install python-lxml").

Thanks Brandon and Sefan. It proved correct that I did not have python3-dev installed
.. but after intalling it, the pip install lxml still fails!

There's a huge amount of output but what follows might provide clues as to the current problem:

................

    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown
distribution option: 'bugtrack_url'
      warnings.warn(msg)

    warning: no previously-included files found matching '*.py'
.......

Cleaning up...
Command /home/alex/P3env/env/bin/python3 -c "import setuptools,
tokenize;__file__='/home/alex/P3env/env/build/lxml/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-56yiw_ye-record/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/alex/P3env/env/include/site/python3.4 failed with error code 1 in
/home/alex/P3env/env/build/lxml
Storing debug log for failure in /home/alex/.pip/pip.log


Looking at ~/.pip/pip.log
there seem to be hundreds of Skipping link ... unknown archive format:
.egg, .exe, lines typified by the following two:
Skipping link https://pypi.python.org/packages/2.7/l/lxml/lxml-2.3beta1-py2.7-win32.egg#md5=4c0da2b308dd2cd0095de21c26647842 (from https://pypi.python.org/simple/lxml/); unknown archive format: .egg Skipping link https://pypi.python.org/packages/2.7/l/lxml/lxml-2.3beta1.win32-py2.7.exe#md5=ea0224feed6f649cdb1ccb656ab91d81 (from https://pypi.python.org/simple/lxml/); unknown archive format: .exe

Then it found some tar.gz links (103 of them to be exact)
Then "Ignoring link .." for bout 27 lines and finally
Some possibly useful information:

Using version 3.4.2 (newest of versions: 3.4.2, 3.4.1, 3.4.0, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.2, 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0, 2.3.6, 2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.3.1, 2.3, 2.2.8, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1, 2.0.11, 2.0.10, 2.0.9, 2.0.8, 2.0.7, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0, 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3, 1.2.1, 1.2, 1.1.2, 1.1.1, 1.1, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0, 0.9.2, 0.9.1, 0.9) Downloading from URL https://pypi.python.org/packages/source/l/lxml/lxml-3.4.2.tar.gz#md5=429e5e771c4be0798923c04cb9739b4e (from https://pypi.python.org/simple/lxml/) Running setup.py (path:/home/alex/P3env/env/build/lxml/setup.py) egg_info for package lxml
    Building lxml version 3.4.2.
    Building without Cython.
    Using build configuration of libxslt 1.1.28
    running egg_info
    creating pip-egg-info/lxml.egg-info
    writing pip-egg-info/lxml.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/lxml.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/lxml.egg-info/top_level.txt
    writing requirements to pip-egg-info/lxml.egg-info/requires.txt
    writing manifest file 'pip-egg-info/lxml.egg-info/SOURCES.txt'
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    warning: manifest_maker: standard file '-c' not found

..........

i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/libxml2 -I/home/alex/P3env/env/build/lxml/src/lxml/includes -I/usr/include/python3.4m -I/home/alex/P3env/env/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-i686-3.4/src/lxml/lxml.etree.o -w i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-i686-3.4/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-i686-3.4/lxml/etree.cpython-34m.so
    /usr/bin/ld: cannot find -lz
    collect2: error: ld returned 1 exit status
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    error: command 'i686-linux-gnu-gcc' failed with exit status 1
Complete output from command /home/alex/P3env/env/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/P3env/env/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-56yiw_ye-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/alex/P3env/env/include/site/python3.4:
    Building lxml version 3.4.2.

Building without Cython.

Using build configuration of libxslt 1.1.28

running install

running build

running build_py

creating build

..........


i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/libxml2 -I/home/alex/P3env/env/build/lxml/src/lxml/includes -I/usr/include/python3.4m -I/home/alex/P3env/env/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-i686-3.4/src/lxml/lxml.etree.o -w

i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-i686-3.4/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-i686-3.4/lxml/etree.cpython-34m.so

/usr/bin/ld: cannot find -lz

collect2: error: ld returned 1 exit status

/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'

  warnings.warn(msg)

error: command 'i686-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir /home/alex/P3env/env/build...
Command /home/alex/P3env/env/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/P3env/env/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-56yiw_ye-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/alex/P3env/env/include/site/python3.4 failed with error code 1 in /home/alex/P3env/env/build/lxml
Exception information:
Traceback (most recent call last):
File "/home/alex/P3env/env/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
File "/home/alex/P3env/env/lib/python3.4/site-packages/pip/commands/install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) File "/home/alex/P3env/env/lib/python3.4/site-packages/pip/req.py", line 1435, in install requirement.install(install_options, global_options, *args, **kwargs) File "/home/alex/P3env/env/lib/python3.4/site-packages/pip/req.py", line 706, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "/home/alex/P3env/env/lib/python3.4/site-packages/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command /home/alex/P3env/env/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/P3env/env/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-56yiw_ye-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/alex/P3env/env/include/site/python3.4 failed with error code 1 in /home/alex/P3env/env/build/lxml


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to