Problem

Due to compilation issues of this library in Windows currently (14 Jun 2023), GAIA API can only execute on Python 3.9.X. In Unix and MacOS supports Python 3.11.X.

If you work GAIA API on Windows and will deploy on Unix or MacOS, take into account that some libraries which you could add to GAIA API are compiled with this issues and will force the user of Python 3.9.X on Unix and MacOS

Solution

The solutions provided should be tested in order.

Solution 1

Install the prerequisites for your operating system.

  1. Install prerequisites
    1. For macOS

      brew install libxml2 libxmlsec1 pkg-config
    2. For Windows

      pip install xmlsec --no-binary=xmlsec
    3. For Debian (Ubuntu)

      sudo apt-get install pkg-config libxml2-dev libxmlsec1 libxmlsec1-dev libxmlsec1-openssl
    4. For CentOS

      yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
    5. For Fedora

      dnf install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
    6. For Alpine

      apk add build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec
  2. Run the pip install xmlsec command.

    pip install xmlsec 
    //or 
    python -m pip install xmlsec
    // or 
    pip3 install xmlsec
    //or
    python3 -m pip install xmlsec

Solution 2

Upgrade the setuptools and wheel packages as well.

pip install --upgrade setuptools wheel
//or
pip3 install --upgrade setuptools wheel
//or
python -m pip install --upgrade setuptools wheel
//or
python3 -m pip install --upgrade setuptools wheel

Try to rerun the pip install command after upgrading setuptools and wheel.

Solution 3

Try to run the pip install command with the --upgrade option.

pip install xmlsec --upgrade
//or
pip3 install xmlsec --upgrade
//or 
python -m pip install xmlsec --upgrade
//or
python3 -m pip install xmlsec --upgrade

Solution 4

Try installing the package with the --no-cache-dir option to disable the cache.

pip install xmlsec --no-cache-dir
//or
pip3 install xmlsec --no-cache-dir
//or 
python -m pip install xmlsec --no-cache-dir
//or
python3 -m pip install xmlsec --no-cache-dir

Solution 5

Use the `--pre` option to include pre-release and development versions of the package.

pip install xmlsec --pre
//or
pip3 install xmlsec --pre
//or 
python -m pip install xmlsec --pre
//or
python3 -m pip install xmlsec --pre

Solution 6

Try running the pip install command with the --no-use-pep517 option.

pip install --no-use-pep517 xmlsec
//or
pip3 install --no-use-pep517 xmlsec
//or
python -m pip install --no-use-pep517 xmlsec
//or
python3 -m pip install --no-use-pep517 xmlsec