Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Using pip install python-tbk fails over looking for xmlsec1 #23

Open
kennyvivas opened this issue Oct 18, 2019 · 11 comments
Open

Using pip install python-tbk fails over looking for xmlsec1 #23

kennyvivas opened this issue Oct 18, 2019 · 11 comments

Comments

@kennyvivas
Copy link

Installing collected packages: attrs, six, isodate, defusedxml, cached-property, idna, certifi, urllib3, chardet, requests, requests-toolbelt, pytz, appdirs, lxml, zeep, pkgconfig, xmlsec, python-tbk Running setup.py install for xmlsec ... error Complete output from command /Users/merrick/Projects/test-tbk/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-erp6c1ch-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/merrick/Projects/test-tbk/env/include/site/python3.6/xmlsec: running install running build running build_ext Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/setup.py", line 60, in <module> 'Topic :: Text Processing :: Markup :: XML' File "/Users/merrick/Projects/test-tbk/env/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/Users/merrick/Projects/test-tbk/env/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run self.run_command('build') File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/setup.py", line 11, in run self.patch_options() File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/setup.py", line 16, in patch_options ext.define_macros.extend(xmlsec_setupinfo.define_macros()) File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/xmlsec_setupinfo.py", line 48, in define_macros macros.extend(xmlsec_config()['define_macros']) File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/xmlsec_setupinfo.py", line 111, in xmlsec_config __XMLSEC_CONFIG = load_xmlsec1_config() File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-build-b5mfrzef/xmlsec/xmlsec_setupinfo.py", line 164, in load_xmlsec1_config config = pkgconfig.parse('xmlsec1') File "/Users/merrick/Projects/test-tbk/env/lib/python3.6/site-packages/pkgconfig/pkgconfig.py", line 248, in parse _raise_if_not_exists(package) File "/Users/merrick/Projects/test-tbk/env/lib/python3.6/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists raise PackageNotFoundError(package) pkgconfig.pkgconfig.PackageNotFoundError: xmlsec1 not found

Tested on OSX 10.11 and Heroku with the following envs:

  • Python: 3.6.5, 3.7

On OSX I tried installing:
brew install libxml2 libxmlsec1 pkg-config
But nothing was solved. Even trying to manually installing
pip install xmlsec
throws the same error:

pip install xmlsec
Collecting xmlsec
  Using cached https://files.pythonhosted.org/packages/35/42/d7cd323c91d4706f3cc32ffe7d5f851ab8ef9898ccb350f6ba593dd8b89a/xmlsec-1.3.3.tar.gz
Requirement already satisfied: pkgconfig in /Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages (from xmlsec) (1.5.1)
Requirement already satisfied: lxml>=3.0 in /Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages (from xmlsec) (4.4.1)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/merrick/Projects/virtualenvs/project/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py'"'"'; __file__='"'"'/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-wheel-hslybasi --python-tag cp37
       cwd: /private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/
  Complete output (42 lines):
  running bdist_wheel
  running build
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py", line 60, in <module>
      'Topic :: Text Processing :: Markup :: XML'
    File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 192, in run
      self.run_command('build')
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py", line 11, in run
      self.patch_options()
    File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py", line 16, in patch_options
      ext.define_macros.extend(xmlsec_setupinfo.define_macros())
    File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/xmlsec_setupinfo.py", line 48, in define_macros
      macros.extend(xmlsec_config()['define_macros'])
    File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/xmlsec_setupinfo.py", line 111, in xmlsec_config
      __XMLSEC_CONFIG = load_xmlsec1_config()
    File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/xmlsec_setupinfo.py", line 164, in load_xmlsec1_config
      config = pkgconfig.parse('xmlsec1')
    File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse
      _raise_if_not_exists(package)
    File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
      raise PackageNotFoundError(package)
  pkgconfig.pkgconfig.PackageNotFoundError: xmlsec1 not found
  ----------------------------------------
  ERROR: Failed building wheel for xmlsec
  Running setup.py clean for xmlsec
Failed to build xmlsec
Installing collected packages: xmlsec
    Running setup.py install for xmlsec ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/merrick/Projects/virtualenvs/project/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py'"'"'; __file__='"'"'/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-record-mp4xtyhy/install-record.txt --single-version-externally-managed --compile --install-headers /Users/merrick/Projects/virtualenvs/project/include/site/python3.7/xmlsec
         cwd: /private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/
    Complete output (44 lines):
    running install
    running build
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py", line 60, in <module>
        'Topic :: Text Processing :: Markup :: XML'
      File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py", line 11, in run
        self.patch_options()
      File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py", line 16, in patch_options
        ext.define_macros.extend(xmlsec_setupinfo.define_macros())
      File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/xmlsec_setupinfo.py", line 48, in define_macros
        macros.extend(xmlsec_config()['define_macros'])
      File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/xmlsec_setupinfo.py", line 111, in xmlsec_config
        __XMLSEC_CONFIG = load_xmlsec1_config()
      File "/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/xmlsec_setupinfo.py", line 164, in load_xmlsec1_config
        config = pkgconfig.parse('xmlsec1')
      File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse
        _raise_if_not_exists(package)
      File "/Users/merrick/Projects/virtualenvs/project/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
        raise PackageNotFoundError(package)
    pkgconfig.pkgconfig.PackageNotFoundError: xmlsec1 not found
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/merrick/Projects/virtualenvs/project/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py'"'"'; __file__='"'"'/private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-install-1_u97d2h/xmlsec/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/m8/sscd1x3d7kg82hg7s3yy966c0000gp/T/pip-record-mp4xtyhy/install-record.txt --single-version-externally-managed --compile --install-headers /Users/merrick/Projects/virtualenvs/project/include/site/python3.7/xmlsec Check the logs for full command output.
@kennyvivas
Copy link
Author

Someone else having this same issue?
Or it is this package not currently supported by cornershop team?

@ragMartinez
Copy link

I have the same problem, did you find any solution ?

@joekohlsdorf
Copy link

These issues are caused by the third party library xmlsec, you can find installation instructions in their Readme: https://github.com/mehcode/python-xmlsec

Basically, for building the xmlsec wheel on Debian/Ubuntu you have to install the following package:

apt-get update && apt-get install -y --no-install-recommends libxmlsec1-dev

At runtime the following package is sufficient:

apt-get update && apt-get install -y --no-install-recommends libxmlsec1-openssl

On OSX we are aware that it requires some hacks so I'd recommend you to use Docker.
This could be solved by the third party library providing wheels which we unfortunately have no control over.

@joalzamora
Copy link

+1 about ubuntu 18.04

apt-get install libxmlsec1-dev
apt-get install libxmlsec1-openssl

@fmirandaTN
Copy link

I'm having the same issue while trying to use the library in a heroku app, I cant use the 'apt-get install libxmlsec1-dev' in the heroku bash to fix it like a did it in local. Any solution for this problem and hosting in heroku?

@joekohlsdorf
Copy link

I'm having the same issue while trying to use the library in a heroku app, I cant use the 'apt-get install libxmlsec1-dev' in the heroku bash to fix it like a did it in local. Any solution for this problem and hosting in heroku?

You can use heroku-buildpack-apt or use a custom Docker image.

@fmirandaTN
Copy link

fmirandaTN commented Aug 10, 2020

I'm having the same issue while trying to use the library in a heroku app, I cant use the 'apt-get install libxmlsec1-dev' in the heroku bash to fix it like a did it in local. Any solution for this problem and hosting in heroku?

You can use heroku-buildpack-apt or use a custom Docker image.

I used the buildpack-apt and it worked flawlessly, thank you for the quick response joe.

@fmirandaTN
Copy link

I'm having the same issue with the library libxmlsec1-dev and xmlsec1 while trying to upload my django project to AWS elastic beanstalk. Does anyone has some insight about this? (Without a Docker container)

@paulpopaul
Copy link

tengo el mismo error, alguien pudo solucionarlo ? no deja instalar lxml ni en python3.6 ni python3.8, qué puedo hacer? :((

@MagonBC
Copy link

MagonBC commented Oct 29, 2021

yum or zypper install xmlsec1-devel (python 3.8)

@matiasmsm
Copy link

Hi! This is the solution that worked for me using a MacOs computer:
sudo xcode-select --reset
pip install xmlsec
pip install python-tbk

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants