我想使用“
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