尝试下载“pip install pcapy”时出错

问题描述 投票:0回答:1

我想使用“

pip install pcapy
”安装pcapy,但不断收到此错误:

Collecting pcapy
  Using cached pcapy-0.11.4.tar.gz (37 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/q_/sgpdqy3d3wj_w3s3jfctw14r0000gn/T/pip-install-xxth8wkc/pcapy_ad5b43f8a92c48fe80e1260f891552a3/setup.py", line 49, in <module>
          save_init_posix = sysconfig._init_posix
                            ^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'distutils.sysconfig' has no attribute '_init_posix'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

根据本文档更新了wheel和piphttps://sebhastian.com/error-metadata- Generation-failed/

运行Python 3.11.5

installation error-handling pip
1个回答
0
投票

这是一个不再维护的软件包中的“未决问题”。你可以做的是查看 libpcap 的其他 python 绑定,例如

pcapyplus 
,它声称是 pycapy 的维护版本:

Pcapyplus 是由 CORE Security Technologies 不再维护的 pcapy 维护的分支,可在以下位置获取:

https://github.com/helpsystems/pcapy

(来自 pypi)

© www.soinside.com 2019 - 2024. All rights reserved.