0

I'm trying to install my django project requirements.txt but got this error:

Building wheel for xmlsec (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for xmlsec (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [65 lines of output]
      ...
      creating build/temp.macosx-13.4-arm64-cpython-39/private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -DOPENSSL_NO_SSL3 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/opt/homebrew/opt/libxml2/include -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_FTP=1 -DXMLSEC_NO_MD5=1 -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.13 -I/opt/homebrew/Cellar/libxml2/2.11.4_1/include/libxml2 -I/opt/homebrew/Cellar/libxmlsec1/1.3.1_1/include/xmlsec1 -I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/opt/openssl@3/include/openssl -I/private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-build-env-o8osrqvn/overlay/lib/python3.9/site-packages/lxml/includes -I/private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-build-env-o8osrqvn/overlay/lib/python3.9/site-packages/lxml -I/private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-build-env-o8osrqvn/overlay/lib/python3.9/site-packages/lxml/includes/__pycache__ -I/Users/albertosanmartinmartinez/.pyenv/versions/venv_tmc_academy_olf_3-9-17/include -I/Users/albertosanmartinmartinez/.pyenv/versions/3.9.17/include/python3.9 -c /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/constants.c -o build/temp.macosx-13.4-arm64-cpython-39/private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/constants.c:319:5: error: use of undeclared identifier 'xmlSecSoap11Ns'
          PYXMLSEC_ADD_NS_CONSTANT(Soap11Ns, "SOAP11");
          ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/constants.c:304:46: note: expanded from macro 'PYXMLSEC_ADD_NS_CONSTANT'
          tmp = PyUnicode_FromString((const char*)(JOIN(xmlSec, name))); \
                                                   ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/common.h:19:19: note: expanded from macro 'JOIN'
      #define JOIN(X,Y) DO_JOIN1(X,Y)
                        ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/common.h:20:23: note: expanded from macro 'DO_JOIN1'
      #define DO_JOIN1(X,Y) DO_JOIN2(X,Y)
                            ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/common.h:21:23: note: expanded from macro 'DO_JOIN2'
      #define DO_JOIN2(X,Y) X##Y
                            ^
      <scratch space>:205:1: note: expanded from here
      xmlSecSoap11Ns
      ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/constants.c:320:5: error: use of undeclared identifier 'xmlSecSoap12Ns'; did you mean 'xmlSecXPath2Ns'?
          PYXMLSEC_ADD_NS_CONSTANT(Soap12Ns, "SOAP12");
          ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/constants.c:304:46: note: expanded from macro 'PYXMLSEC_ADD_NS_CONSTANT'
          tmp = PyUnicode_FromString((const char*)(JOIN(xmlSec, name))); \
                                                   ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/common.h:19:19: note: expanded from macro 'JOIN'
      #define JOIN(X,Y) DO_JOIN1(X,Y)
                        ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/common.h:20:23: note: expanded from macro 'DO_JOIN1'
      #define DO_JOIN1(X,Y) DO_JOIN2(X,Y)
                            ^
      /private/var/folders/yv/mbl800td04xb4pd9hctdshd00000gn/T/pip-install-9eiq7z0e/xmlsec_684993bb97f3403387c9cfd7b80e299a/src/common.h:21:23: note: expanded from macro 'DO_JOIN2'
      #define DO_JOIN2(X,Y) X##Y
                            ^
      <scratch space>:207:1: note: expanded from here
      xmlSecSoap12Ns
      ^
      /opt/homebrew/Cellar/libxmlsec1/1.3.1_1/include/xmlsec1/xmlsec/strings.h:34:33: note: 'xmlSecXPath2Ns' declared here
      XMLSEC_EXPORT_VAR const xmlChar xmlSecXPath2Ns[];
                                      ^
      2 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for xmlsec
Successfully built ...
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec, which is required to install pyproject.toml-based projects

I installed homebrew arm64 arch version, reinstalled libxml2 libxmlsec1 and pkg-config and followed this issue but error persist.

Any idea how to fix it ? Thanks in advance.

  • Does this answer your question? [Can't install xmlsec via pip](https://stackoverflow.com/questions/76005401/cant-install-xmlsec-via-pip) – tevemadar Aug 06 '23 at 13:18

0 Answers0