1

I am having hard time to install a python lib called python3-saml

To narrow down the problem I created a very simple application on ibm-cloud and I can deploy it without any problem, but when I add as a requirement the lib python3-saml I got an exception saying:

pkgconfig.pkgconfig.PackageNotFoundError: xmlsec1 not found

The above was a deployment on ibm-cloud, but I did try to install the same python lib locally and I got the same error message, locally I can see that I have the xmlsec1 installed.

Any help on how to successfully deploy it on ibm-cloud using python3-saml?

Thanks in advance

nitind
  • 19,089
  • 4
  • 34
  • 43

2 Answers2

2

I had a similar issue and I had to install the "xmlsec1-devel" on my CentOS system before installing the python package.

Firass
  • 315
  • 2
  • 6
0

When you deploy an app to Cloud Foundry on IBM Cloud (or other providers) you define the Python dependencies in a file requirements.txt. Check this Cloud Foundry documentation on the Python buildpack for details on what to consider and where to place the files.

data_henrik
  • 16,724
  • 2
  • 28
  • 49
  • Thanks for the answer but it doesn't address the issue, the missing is a C application that I cannot install from the requirements.txt – Edrei Marcelo Ribeiro Oct 08 '19 at 15:04
  • @EdreiMarceloRibeiro - As a general rule, Python C applications are compiled when installed. This is not supported. You will either need to use a different library or prebuild the library yourself. Another tip. Use `virtualenv` when building apps to be deployed to other systems. You will then be able to use `pip freeze` to build the dependency list for `requirements.txt`. – John Hanley Oct 08 '19 at 21:32