pythonxmlpython-3.4xmlsec

Error installing xmlsec in linux server with python 3.4


started seeing this error today installing xmlsec in a linux server. I see part of the error says This lxml version requires Python 2.7, 3.5 or later. but I can't find any documentation of python v3.4 being dropped by this library or how to deal with this issue. Help me get this working again without having to upgrade python 3.5. Thanks in advance.

  Downloading https://files.pythonhosted.org/packages/35/42/d7cd323c91d4706f3cc32ffe7d5f851ab8ef9898ccb350f6ba593dd8b89a/xmlsec-1.3.3.tar.gz
    Complete output from command python setup.py egg_info:
    This lxml version requires Python 2.7, 3.5 or later.
    Traceback (most recent call last):
      File "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-hkv6kerj/lxml-4.4.0/setup.py", line 12, in <module>
        build_ext.build_ext.run(self)
    SystemExit: 1

Solution

  • First of all: lxml is a separated package, xmlsec depends on it and installs the latest version of lxml for ya, when you pip install xmlsec. And few days ago https://pypi.org/project/lxml/ - "Support for Python 3.4 was removed."

    Second of all: We had the same problem yesterday. Even tho we had lxml version frozen to < 4.4.0, we still saw that xmlsec trying to setup latest lxml. We just removed xmlsec from requirements.txt and installed it with a separated pip install and it did the trick.

    Basically: