在pip安装xmlsec时收到“错误:xmlsec1未安装或不在路径中”

问题描述

我使用的是 MacOS 10.15.7 Catalina,我目前使用的是 Python 3.8.4 和 Pip 21.1.1

无论出于何种原因,当我尝试运行 python -m pip install xmlsec

时,我不断收到错误消息

文本格式错误

➜ python -m pip install xmlsec 
Collecting xmlsec
  Using cached xmlsec-1.3.10.tar.gz (62 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel Metadata ... done
Requirement already satisfied: lxml>=3.8 in /Users/rsheikh/.pyenv/versions/3.8.4/lib/python3.8/site-packages (from xmlsec) (4.6.3)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/rsheikh/.pyenv/versions/3.8.4/bin/python /Users/rsheikh/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/q6/l4q1yvg11v3dftcbdqr8jxgh0000gq/T/tmp6b9bs29g
       cwd: /private/var/folders/q6/l4q1yvg11v3dftcbdqr8jxgh0000gq/T/pip-install-re_pqhol/xmlsec_f862b9f5baae4fe49f2ba58dadb464f1
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  /private/var/folders/q6/l4q1yvg11v3dftcbdqr8jxgh0000gq/T/pip-build-env-dqtkuueu/overlay/lib/python3.8/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    warnings.warn(
  /private/var/folders/q6/l4q1yvg11v3dftcbdqr8jxgh0000gq/T/pip-build-env-dqtkuueu/overlay/lib/python3.8/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
    warnings.warn(
  /private/var/folders/q6/l4q1yvg11v3dftcbdqr8jxgh0000gq/T/pip-build-env-dqtkuueu/overlay/lib/python3.8/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
    warnings.warn(
  package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
  creating build
  creating build/lib.macosx-10.15-x86_64-3.8
  creating build/lib.macosx-10.15-x86_64-3.8/xmlsec
  copying src/xmlsec/py.typed -> build/lib.macosx-10.15-x86_64-3.8/xmlsec
  copying src/xmlsec/tree.pyi -> build/lib.macosx-10.15-x86_64-3.8/xmlsec
  copying src/xmlsec/__init__.pyi -> build/lib.macosx-10.15-x86_64-3.8/xmlsec
  copying src/xmlsec/constants.pyi -> build/lib.macosx-10.15-x86_64-3.8/xmlsec
  copying src/xmlsec/template.pyi -> build/lib.macosx-10.15-x86_64-3.8/xmlsec
  running build_ext
  error: xmlsec1 is not installed or not in path.
  ----------------------------------------
  ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec which use PEP 517 and cannot be installed directly

但是,我验证了 xmlsec1 是使用 xmlsec1 --version 安装的,它返回:xmlsec1 1.2.32 (openssl)

到目前为止,我使用自制软件安装了 pkg-config 0.29.2_3Libxmlsec1 1.2.32libxml2 2.9.10_2

我还向我的 Libxmlsec1 添加了必要的 openssl 1.1 导出和 ./zshrc 导出。

是否有一个额外的参数需要添加到我的 zsh 路径中才能使这个 pip 安装正常工作,但我缺少这个参数?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...